$npx skillfedfor your agent

runtype

Type dispatch and validation for run-time Python

Worth itPyPI Python ModulesReleased Mar 2025649.1K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — runtype-0.5.3-py3-none-any.whl
v0.5.3 · released 2025-03-03 · Python <4.0,>=3.8

Yes. Runtype is actively maintained, has no dependencies, supports current Python versions (3.8+), carries no known vulnerabilities, and offers a cohesive toolkit for runtime type validation and dispatch. Install it if you need runtime type safety in dataclasses or want to use multiple dispatch without external dependencies. The permissive MIT license removes any legal friction.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.8 or later.
  • Installation is straightforward with no runtime dependencies.
  • The package is actively maintained with a recent release on 2025-03-03 and an active repository.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open and closed-source projects.

last release 2025-03-03 (529 days) · last repo commit 2026-06-26 · 175 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 649,116 downloads/mo, #5,578 on PyPI

Verify before relying

pip install runtype

from runtype import isa, dataclass, multidispatch as md

assert isa({'a': 1}, dict[str, int])

@dataclass(check_types='cast')
class Person:
    name: str

p = Person('Alice')

@md
def process(x: int):
    return x * 2

@md
def process(x: str):
    return x.upper()

process(5)  # Returns 10
  • Whether the claimed performance advantage over Pydantic v1 and other type checkers holds across all use patterns and Python versions.
  • Compatibility and behavior with Python 3.13+ given the current support ceiling.
Same gist for agents: .md · .json

What it is and what it does

Runtype is a pure-Python type system for runtime validation and dispatch. It provides three main capabilities: a validation layer (`isa`, `issubclass`) that understands `typing` module constructs and constraints; an enhanced dataclass decorator that validates and optionally casts field values at instantiation; and a multiple-dispatch decorator that routes function calls to the most specific type-matching implementation.

The package is designed for developers who need runtime type safety without external C dependencies. It supports forward references, generic types, and custom type constraints. The dataclass mode can auto-cast values (like Pydantic) and sample large collections for faster validation. All three modules are built on an internal type system that the documentation claims outperforms comparable libraries like Pydantic v1 and beartype in pure-Python benchmarks.

Use it for

  • Add runtime type validation to dataclasses with automatic value casting and constraint checking.
  • Implement multiple-dispatch functions that route to different implementations based on argument types.
  • Validate complex nested types (e.g., `dict[str, list[int]]`) at runtime without external type checkers.
  • Build custom type systems with generics and phantom types for domain-specific validation.
  • Replace `isinstance` checks with smarter type validation that understands `typing` module annotations.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Runtype is actively maintained, has no dependencies, supports current Python versions (3.8+), carries no known vulnerabilities, and offers a cohesive toolkit for runtime type validation and dispatch. Install it if you need runtime type safety in dataclasses or want to use multiple dispatch without external dependencies. The permissive MIT license removes any legal friction.

Install

runtype on PyPI

Before you install

Installation is straightforward with no runtime dependencies. The package is actively maintained with a recent release on 2025-03-03 and an active repository.

Requires Python 3.8 or later.

License in practice

MIT license permits unrestricted use, modification, and distribution in both open and closed-source projects.

Quickstart

pip install runtype

from runtype import isa, dataclass, multidispatch as md

assert isa({'a': 1}, dict[str, int])

@dataclass(check_types='cast')
class Person:
    name: str

p = Person('Alice')

@md
def process(x: int):
    return x * 2

@md
def process(x: str):
    return x.upper()

process(5)  # Returns 10

Verify before relying

  • Whether the claimed performance advantage over Pydantic v1 and other type checkers holds across all use patterns and Python versions.
  • Compatibility and behavior with Python 3.13+ given the current support ceiling.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release <4.0,>=3.8
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 529 days since the last release
Last repo commit
First released
Downloads649,116 / month, #5,578 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality AssuranceTopic :: Utilities

Evidence: runtype-0.5.3-py3-none-any.whl

Tags

Capabilities
runtime type validationtype dispatch functionsdataclass type checkingmultiple dispatch decoratortyping module validationruntime type constraintsfast type checking
Topics
type-validationmultiple-dispatchdataclass-enhancement
PyPI keywords
typestypingdispatchmultimethodsdataclassruntime

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “dataclass type checking”

  • runtypeRuntype provides runtime type validation, dataclass enhancement with…
  • typed-json-dataclassAdds JSON serialization and type validation to Python dataclasses,…
  • daciteConverts dictionaries into dataclass instances with support for…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also ovld · undictify · sumtypes · phantom-types · multimethod · typed-json-dataclass · plum-dispatch · overloading · typing-inspect · dataclass-csv