Runtime method overload decorator to simulate C/C++ behavior of having multiple functions with the same name but different parameters.
Project description
strongtyping-pyoverload
Runtime method overloading for Python
strongtyping-pyoverload provides a powerful overload decorator that brings true runtime method overloading to Python, similar to C++.
Key Features
- Native Pydantic Integration: Automatically validate and dispatch based on Pydantic models.
- Deep Inheritance & Mixin Support: Respects Method Resolution Order (MRO) for complex class hierarchies.
- AI-Ready Metadata: Sets
__signature__and__annotations__for better IDE and AI assistant support. - High Performance: Optimized lookup logic with caching for minimal overhead.
- Modern Python: Full support for
typing.Annotated, keyword-only parameters, and Python 3.13+.
Quick Start
from strongtyping_pyoverload import overload
class DataProcessor:
@overload
def process(self, data: str):
return data.upper()
@overload
def process(self, data: list):
return [item * 2 for item in data]
Documentation
Full documentation can be found at readthedocs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file strongtyping_pyoverload-1.0.1.tar.gz.
File metadata
- Download URL: strongtyping_pyoverload-1.0.1.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
058ffaba296b99a41c04af433554c3cf9f1353b8f4eb40d68f411205f7433273
|
|
| MD5 |
0c3db6401bfd19470c197b5591d569b0
|
|
| BLAKE2b-256 |
db5637e88d109da154876a54558d37966a2f09833a3de32c83588e2ca3258741
|
Provenance
The following attestation bundles were made for strongtyping_pyoverload-1.0.1.tar.gz:
Publisher:
python-publish.yml on FelixTheC/py-overload
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
strongtyping_pyoverload-1.0.1.tar.gz -
Subject digest:
058ffaba296b99a41c04af433554c3cf9f1353b8f4eb40d68f411205f7433273 - Sigstore transparency entry: 1952217611
- Sigstore integration time:
-
Permalink:
FelixTheC/py-overload@82fd0cc62cf085117f47cc608a38988042cd556f -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/FelixTheC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@82fd0cc62cf085117f47cc608a38988042cd556f -
Trigger Event:
release
-
Statement type:
File details
Details for the file strongtyping_pyoverload-1.0.1-py3-none-any.whl.
File metadata
- Download URL: strongtyping_pyoverload-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea03145fdc3d2f14641eb960d6b8a6404e72362499b4ac156d743d4b76793fc6
|
|
| MD5 |
312ae2b76f4b70f04baef8fad9657422
|
|
| BLAKE2b-256 |
bded368ae10f365baa2b2d041dfd28831130a213503317c59e684b442b845b61
|
Provenance
The following attestation bundles were made for strongtyping_pyoverload-1.0.1-py3-none-any.whl:
Publisher:
python-publish.yml on FelixTheC/py-overload
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
strongtyping_pyoverload-1.0.1-py3-none-any.whl -
Subject digest:
ea03145fdc3d2f14641eb960d6b8a6404e72362499b4ac156d743d4b76793fc6 - Sigstore transparency entry: 1952217886
- Sigstore integration time:
-
Permalink:
FelixTheC/py-overload@82fd0cc62cf085117f47cc608a38988042cd556f -
Branch / Tag:
refs/tags/1.0.1 - Owner: https://github.com/FelixTheC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@82fd0cc62cf085117f47cc608a38988042cd556f -
Trigger Event:
release
-
Statement type: