{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/12"}],"enrichment":{"capability":"Extracts and stores docstrings for class attributes at runtime, implementing PEP 224 to make attribute documentation programmatically accessible via decorator or function call.","skillfed_tags":["documentation","introspection","metadata"],"use_cases":["Generate API documentation or help text from class attribute docstrings at runtime","Build introspectable data models where each field carries its own documentation","Decorate Enum classes to attach descriptions to each enum value for user-facing displays","Extract attribute metadata for validation, serialization, or schema generation tools"],"what_it_does":"attributes-doc provides a decorator and utility functions to capture and store docstrings written immediately after class attributes, making them accessible at runtime as special attributes or via helper functions. It implements PEP 224, which proposed a syntax for documenting individual class members. The package works by scanning a class definition, extracting docstrings that follow attribute assignments, and storing them either as `__doc_ATTRNAME__` attributes on the class or in a dictionary returned by a query function.\n\nThe package offers four main entry points: a `@attributes_doc` decorator for regular classes, a `get_attributes_doc()` function to extract docs without modifying a class, an `@enum_doc` decorator for Enum classes that attaches docs to individual enum members, and a `get_doc()` helper to retrieve a single attribute's docstring. It has no runtime dependencies and supports Python 3.8 through 3.12.","worth_installing":"Yes, if you need to attach and retrieve docstrings for class attributes at runtime. The package is lightweight, has no dependencies, and works on current Python versions. The dormant maintenance status is a minor concern for a small, stable utility\u2014suitable for projects that don't require active development, but verify it fits your documentation workflow before adopting."},"id":"attributes-doc","links":{"html":"https://skillfed.io/packages/attributes-doc","md":"https://skillfed.io/packages/attributes-doc.md","pypi":"https://pypi.org/project/attributes-doc/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2024-01-09","license_spdx":null,"license_treatment":"permissive","name":"attributes-doc","python_support":"supports_current","summary":"PEP 224 implementation"},"popularity":{"monthly_downloads":439416,"position":6656,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.4.0"}
