{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/10"},{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/5"},{"label":"Quality Assurance","url":"https://skillfed.io/packages/category/software-development-quality-assurance/2"}],"enrichment":{"capability":"Runtype provides runtime type validation, dataclass enhancement with type checking, and multiple-dispatch function routing based on argument types, all without external dependencies.","skillfed_tags":["type-validation","multiple-dispatch","dataclass-enhancement"],"use_cases":["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."],"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.\n\nThe 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.","worth_installing":"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."},"id":"runtype","links":{"html":"https://skillfed.io/packages/runtype","md":"https://skillfed.io/packages/runtype.md","pypi":"https://pypi.org/project/runtype/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-03-03","license_spdx":null,"license_treatment":"permissive","name":"runtype","python_support":"supports_current","summary":"Type dispatch and validation for run-time Python"},"popularity":{"monthly_downloads":649116,"position":5578,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.5.3"}
