Skip to main content

A runtime type-checking module for Python

Project description

A runtime type-checking module for Python supporting both parameter-type checking and return-type checking for functions, methods and generators.

The main workhorses of this module, the functions accepts and returns, are used as function/method decorators. A yields decorator provides a mechanism to typecheck the values yielded by generators.

Four utility classes, IsAllOf(), IsOneOf(), IsNoneOf() and IsOnlyOneOf() are provided to assist in building more complex signatures by creating boolean expressions based on classes and/or types.

A number of other utility classes exist to aid in type signature creation; for a full list, see the README.txt file or the project’s website.

The module also includes support for type variables, a concept borrowed from languages such as Haskell.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

typecheck-0.3.5.tar.gz (44.6 kB view details)

Uploaded Source

Built Distributions

typecheck-0.3.5-py2.5.egg (36.3 kB view details)

Uploaded Source

typecheck-0.3.5-py2.4.egg (37.1 kB view details)

Uploaded Source

File details

Details for the file typecheck-0.3.5.tar.gz.

File metadata

  • Download URL: typecheck-0.3.5.tar.gz
  • Upload date:
  • Size: 44.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for typecheck-0.3.5.tar.gz
Algorithm Hash digest
SHA256 065fdad53f28fe0145c4f6cce06d25fe243395ed3e37c70aa3faa00c14a223f9
MD5 2723d15fe2f0dfc3b93362bcdbf634bc
BLAKE2b-256 dc2f6daef86a0dfec50dc3106c97e6b93b02d5e5904ed1eb85ee783fa305cb39

See more details on using hashes here.

File details

Details for the file typecheck-0.3.5-py2.5.egg.

File metadata

File hashes

Hashes for typecheck-0.3.5-py2.5.egg
Algorithm Hash digest
SHA256 8a1d3f5cb2973cbe1488f229f8256939a2577bb539080f318f8c6cabae97a566
MD5 9413b5d876a3c2fc15194b9d577b52b6
BLAKE2b-256 b8279c335d5dbd5905c8f40be4509d76a4c2c055302e9c373b714c038de68e1d

See more details on using hashes here.

File details

Details for the file typecheck-0.3.5-py2.4.egg.

File metadata

File hashes

Hashes for typecheck-0.3.5-py2.4.egg
Algorithm Hash digest
SHA256 5f086a700b9a9cdd674e4bb75d0317bf46f58ad90eeabb793be361530b2fa465
MD5 65e7ce4bc9f57bd2cd0ec02fbc6e4ea9
BLAKE2b-256 c3603874daec89e3982005e4ab0d98d252f29e83cf235419384b69735ff22911

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page