overloading
Function overloading for Python 3
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 overloadinguv
uv add overloadingpoetry
poetry add overloadingInstalling 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
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
classesImplements typeclasses for Python, enabling…
permissive · top 15,000 on PyPI
diastatic-maltDiastaticMalt performs source-to-source…
permissive · top 15,000 on PyPI
mo-kwargsProvides an `@override` decorator that lets you…
copyleft · top 15,000 on PyPI
multipledispatchEnables functions to dispatch on the types of…
permissive · top 5,000 on PyPI
ovldOvld provides fast multiple dispatch for Python…
permissive · top 15,000 on PyPI
plum-dispatchPlum implements multiple dispatch in Python,…
permissive · top 5,000 on PyPI
simplegenericProvides a lightweight decorator-based system…
unclear · top 15,000 on PyPI
visitorProvides a base Visitor class to implement the…
permissive · top 15,000 on PyPI
multimethodMultimethod provides a decorator for adding…
permissive · top 5,000 on PyPI
methoddispatchAdds single-dispatch method support to Python…
permissive · top 15,000 on PyPI