Skip to main content
Type Constraints Decorator.

Python decorator for adding function argument type constraint checks to function invocations.
Using the typeconstraints decorator allows you to defensively use asertions of argument types
and return value types of functions and methods.

The module allows the use of custom type constraint asertion classes and comes with a small set
of pre-defined type constaint asertion classes.

Basic usage:

from typeconstraints import typeconstraints,ARRAYOF

@typeconstraints([int,str,ARRAYOF(int)])
def simple_function(foo,bar,baz):
pass

simple_function(42,"hi there",[1,1,2,3,5,8,13,21])


For more information on usage, consult the tutorial here:

https://steemit.com/@mattockfs

Metadata

Release files for typeconstraints 0.9.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for typeconstraints 0.9.10
File Size Uploaded Provenance Actions
typeconstraints-0.9.10.tar.gz 6.0 kB Without provenance Details for typeconstraints-0.9.10.tar.gz

Release files / typeconstraints-0.9.10.tar.gz

Download URL typeconstraints-0.9.10.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fe847087ab08d153b1abc85a5fbaf83d548d02abce700fdadbdb8fd31af5a2d2
BLAKE2b-256 checksum
How to use checksums
e0fcb0e40f7b66048b845354f7148836b25f35e6e1939b8df6614690559b6a63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.10.0 pkginfo/1.2.1 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.6

Security for typeconstraints 0.9.10

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page