{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/18"},{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/9"}],"enrichment":{"capability":"Implements typeclasses for Python, enabling type-based dispatch and polymorphic behavior without inheritance or interfaces, with full mypy support.","skillfed_tags":["functional-programming","type-dispatch","mypy-plugin"],"use_cases":["Implement serialization/deserialization logic that varies by type (e.g., custom JSON converters for int, bool, datetime).","Build validation rules that apply different checks to different data types without inheritance chains.","Create extensible handler registries where third-party code can add support for custom types.","Write functional-style data transformation pipelines where operations dispatch based on input type.","Reduce boilerplate in libraries that need type-specific behavior (like ORMs or REST frameworks)."],"what_it_does":"Classes provides a typeclass system for Python\u2014a way to bind behavior to types without creating class hierarchies or interfaces. Instead of writing many subclasses (like IntField, BoolField, etc.), you define a typeclass as a function and register implementations for specific types using decorators. This approach reduces boilerplate, improves type safety through mypy integration, and makes it easier to extend behavior for new types without modifying existing code.\n\nThe package is designed for declarative, functional-style business logic where different data types need different handling. A common use case is serialization (converting objects to JSON based on their type), but it applies anywhere you'd otherwise use a type-based dispatch pattern. It requires mypy plugin configuration to achieve full type safety; without it, the type checker will report violations.","worth_installing":"Yes, with conditions. Install if you need ad-hoc polymorphism without inheritance and are comfortable with dormant maintenance (last release 2022-04-11). The package is stable, has no known vulnerabilities, and low install friction. Not recommended if you require active upstream support or need assurance of mypy plugin compatibility with the latest type-checker versions."},"id":"classes","links":{"html":"https://skillfed.io/packages/classes","md":"https://skillfed.io/packages/classes.md","pypi":"https://pypi.org/project/classes/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2022-04-11","license_spdx":null,"license_treatment":"permissive","name":"classes","python_support":"supports_current","summary":"Smart, pythonic, ad-hoc, typed polymorphism for Python"},"popularity":{"monthly_downloads":135192,"position":11450,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.4.1"}
