Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

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 typecheck_args and typecheck_return, are used as function/method decorators. A typecheck_yield decorator provides a mechanism to typecheck the values yielded by generators.

Three utility classes, And(), Or() and Not() 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:
Any() - you don’t care about the type IsIterable() - the object can be used in for statements, for example IsCallable() - the object can be invoked HasAttr() - the object has certain attributes; types may also be specified

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

Release History

History Node


History Node


History Node


History Node


This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

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

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(93.9 kB) Copy SHA256 Hash SHA256
Egg 2.4 Dec 18, 2005
(30.2 kB) Copy SHA256 Hash SHA256
Source None Dec 18, 2005

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Google Google Cloud Servers Fastly Fastly CDN StatusPage StatusPage Statuspage DigiCert DigiCert EV Certificate