runtype 0.5.0


Type dispatch and validation for run-time Python

Type dispatch and validation for run-time Python

Stars: 161, Watchers: 161, Forks: 3, Open Issues: 0

The erezsh/runtype repo was created 4 years ago and the last code push was 4 weeks ago.
The project is popular with 161 github stars!

How to Install runtype

You can install runtype using pip

pip install runtype

or add it to a project with poetry

poetry add runtype

Package Details

Erez Shinan
GitHub Repo:


  • Software Development/Libraries/Python Modules
  • Software Development/Quality Assurance
  • Utilities
No  runtype  pypi packages just yet.


A list of common runtype errors.

Code Examples

Here are some runtype code examples and snippets.

GitHub Issues

The runtype package has 0 open issues on GitHub

  • No support for type Literal error when using typing_extensions >= 4.6.0
  • Refactor base_types to use dispatch (WIP)

See more issues on GitHub

Related Packages & Articles

pydantic-gen generates pydantic schemas from YAML files

pydantic-gen is a code generation python package that takes a YML file containing a OpenAPI Schema and generates python pydantic models. pydantic-gen can get used in your codebase to dynamically regenerate your pydantic models or it can be used one time to generator python code. The author of the pydantic-gen module is Mikhail Beliansky.

typing - Support for type hints

This module provides runtime support for type hints as specified by PEP 484, PEP 526, PEP 544, PEP 586, PEP 589, PEP 591, PEP 612 and PEP 613. The most fundamental support consists of the types Any, Union, Tuple, Callable, TypeVar, and Generic. For full specification please see PEP 484. For a simplified introduction to type hints see PEP 483. import typing # preferred from typing import Dict, List, Union, Any myvar: Dict = {} # non-preferred import typing myvar: typing.