Skip to main content

optypecheck

This package implements a non intrusive and optional type checking in functions and methods by using annotations. Once types are defined in annotations, no changes are required to make the verification of types. And, because it is completely optional, it can be used only in the desired environments, like unit testings. This way, the performance of production code is not affected.

Learn more in:

https://bitbucket.org/carlopires/optypecheck

Installation

pip3 install optypecheck

Example

def gencode(a: bytes, b: str) -> str:
    return '{}{}'.format(a[0], b)

def valid_number(n) -> 'decimal.Decimal':
    return n

# enable type checking in DEBUG mode
assert __import__('typecheck').typecheck(__name__)

Metadata

Release files for optypecheck 16

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

Source distribution (sdist)

Source distribution for optypecheck 16
File Size Uploaded Provenance Actions
optypecheck-16.tar.gz 6.7 kB Without provenance Details for optypecheck-16.tar.gz

Release files / optypecheck-16.tar.gz

Download URL optypecheck-16.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5e75166606039ffe957330b92dbc23ea3c9a6b5b393e86111fe93c4b2c452aa8
BLAKE2b-256 checksum
How to use checksums
8bd0938c347a6e593d8a4d528e1cc18a4d7f038035884f2ce828b7321f20d787
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for optypecheck 16

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