skillfed

overloading

Function overloading for Python 3

overloading v0.5.0 324.2K downloads/30d#7,598 on PyPI111
Permissive license MIT Abandoned released

What it is and what it does

Overloading is a Python module that implements function and method dispatch based on the types and number of arguments supplied at runtime. It lets you define multiple implementations of the same function name, each handling a different set of argument types, and automatically routes calls to the best matching implementation. The dispatcher uses type hints and signature validation to guarantee deterministic behavior.

The package supports optional parameters, variadic signatures with *args and **kwargs, class methods, static methods, and evaluates both positional and keyword arguments. It has no dependencies beyond Python's standard library. However, the project is abandoned—the last commit was in 2021-02-17 and the most recent release dates to 2016-04-15—so it will not be maintained for newer Python versions or type system changes.

Use it for:

  • Implement polymorphic functions that behave differently based on input type without explicit type checking.
  • Build APIs where the same function name handles integers, strings, lists, or custom objects with type-safe dispatch.
  • Create mathematical or scientific libraries where operations adapt to numeric types.
  • Simplify method resolution in class hierarchies by dispatching to specialized implementations based on argument types.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides function and method overloading based on runtime argument types and count, dispatching to the best-matching implementation from multiple registered signatures.

No. The package is abandoned (last release 2016-04-15, last commit 2021-02-17) and will not receive updates for modern Python versions or type system changes. Install only if maintaining legacy code that already depends on it.

Install

overloading on PyPI

pip

pip install overloading

uv

uv add overloading

poetry

poetry add overloading

Installing overloading

Before you install

Low install friction with no runtime dependencies beyond the standard library. However, the package is abandoned—last commit was 2021-02-17 and latest release 2016-04-15—so it will not receive updates for Python version changes or security issues.

License in practice

MIT license permits commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license text.

Quickstart

pip install overloading

from overloading import overload

@overload
def process(x: int):
    return x * 2

@overload
def process(x: str):
    return x.upper()

process(5)
process('hello')

Verify before relying

  • Whether the package remains compatible with Python versions released after 2016 or current typing module behavior.
  • Real-world performance characteristics when dispatching across many overloaded signatures.
  • Whether edge cases in type matching (e.g., union types, generic aliases) are handled as expected.
  • Availability of maintained alternatives for modern Python projects.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 3,773 days since the last release
Last repo commit
First released
Downloads 324,211/month — #7,598 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: overloading-0.5.0-py3-none-any.whl

Keywords: overload, function, method, dispatch

License :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5

Tags

function overloading pythonmethod dispatch by typeruntime argument type matchingmultiple function signaturestype-based function dispatchoverload decorator pythonpolymorphic function calls
abandonedtype-dispatch

More Software Development packages