{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/18"}],"enrichment":{"capability":"Allows you to define abstract class properties that subclasses must implement, enforcing required configuration at class definition time with static type-checker support.","skillfed_tags":["abstract-classes","type-hints","class-properties"],"use_cases":["Define a base parser class with an abstract PATTERN property that each parser subclass must set before use.","Create a base array/tensor class that requires subclasses to declare their DIMENSIONS as a class constant.","Enforce that configuration subclasses define required settings (e.g., API endpoint, database URL) at class definition time.","Build plugin systems where each plugin subclass must declare its name, version, or handler type.","Ensure type-safe class hierarchies where mypy validates that abstract properties are satisfied before instantiation."],"what_it_does":"AbstractCP provides a way to define abstract class properties\u2014class-level configuration that subclasses must explicitly set\u2014with support for Python's type hints and static type checkers like mypy. You inherit from the `Abstract` base class and mark required class properties using `abstract_class_property(type)`, which enforces that concrete subclasses provide a value and raises a `TypeError` if they don't. This solves a gap in Python's standard `abc` module, which has no built-in mechanism for abstract class variables.\n\nThe package is designed to be lightweight and Pythonic: it does all validation at class definition time (no runtime overhead), integrates cleanly with type hints, and produces clear error messages when a subclass forgets to define a required property. It supports multi-level inheritance\u2014an abstract class can have abstract children\u2014and works with Python 3.8 and higher.","worth_installing":"Yes, if you need to enforce required class-level configuration in inheritance hierarchies and want static type-checker support. The package is small, has no dependencies, and solves a real gap in Python's standard library. The aging maintenance status is not a blocker for a stable, narrow-scope tool, but verify that the pattern fits your use case\u2014it is not a general-purpose utility."},"id":"abstractcp","links":{"html":"https://skillfed.io/packages/abstractcp","md":"https://skillfed.io/packages/abstractcp.md","pypi":"https://pypi.org/project/abstractcp/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2024-05-20","license_spdx":null,"license_treatment":"permissive","name":"abstractcp","python_support":"supports_current","summary":"Create abstract class variables"},"popularity":{"monthly_downloads":76571,"position":14614,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"1.0.0"}
