allot

Like functools.singledispatch, but will allow to register multiple functions for each class.
If a registered function decides it cannot handle the value after inspecting it, it can give up and let others try their luck:
from allot import allot, Pass
@allot
def f(obj):
return 'object'
@f.register(int)
def f_small_integer(obj):
if obj > 10:
return Pass
return 'small integer'
assert f('a string') == 'object'
assert f(3) == 'small integer'
assert f(10) == 'object'
Metadata
Release files for allot 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| allot-0.2.tar.gz | 18.3 kB | Without provenance | Details for allot-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| allot-0.2-py3-none-any.whl | Python 3 | none | any | Details for allot-0.2-py3-none-any.whl |
Total release size: 57.1 kB
Release files / allot-0.2.tar.gz
| Download URL | allot-0.2.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e607c8860705a5cdc6bbd523470840e938ca5e1f1ac4daac64974483994433b6
|
|
BLAKE2b-256 checksum How to use checksums |
3388a0a075c987fba56a00fdb6f14e05278d78954b3fd0689a24c11bd3b8b555
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.21.0
|
Release files / allot-0.2-py3-none-any.whl
| Download URL | allot-0.2-py3-none-any.whl |
|---|---|
| Size | 38.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c8393ea1257abceb4399ea398dad4385317f06647004617c6a42ea315ed127e3
|
|
BLAKE2b-256 checksum How to use checksums |
28605624bc69d5abae599c79d8a019f7e94fdbaa4cb893b5c45308fb44bd99a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.21.0
|
Security for allot 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.