Skip to main content
typecheck3
===

An easy-to-use Python 3 runtime typechecker.

Usage
---

The typical usage for this decorator would be something like this:

@typecheck
def foo(i: int) -> bool:
return a > 0

@typecheck
def to_int(*, s: by_regex("^[0-9]+$")) -> int:
return int(s)

@typecheck
def set_debug_level(self, level: optional(one_of(1, 2, 3)) = 2):
self._level = level

This recipe is extensible with callable predicates, such as

is_even = lambda x: x % 2 == 0

@typecheck
def multiply_by_2(i: int) -> is_even:
return i * 2

Credits
---

The code was written by Dmitri Dvoinikov and maintained by Esteban Ordano
(@eordano on twitter).

Original link:

http://code.activestate.com/recipes/572161/

Metadata

Release files for typecheck3 0.1.0

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

Built distribution (wheel)

Table of built distributions (wheels) for typecheck3 0.1.0
File Interpreter ABI Platform Actions
typecheck3-0.1.0-py3.3.egg Legacy Egg format - - Details for typecheck3-0.1.0-py3.3.egg

Release files / typecheck3-0.1.0-py3.3.egg

Download URL typecheck3-0.1.0-py3.3.egg
Size 1.4 kB
Tags Egg
SHA-256 checksum
How to use checksums
6dc777b12402f45e0a0bd355dbce455976618afbc5f3d235affe8d9f393cc08e
BLAKE2b-256 checksum
How to use checksums
87352f4f5eeea4ac99348e549e380989b3be8d5c37751690236e693ed2082a70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for typecheck3 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

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