attributes-doc
PEP 224 implementation
Decision gist · record as of 2026-08-14
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—suitable for projects that don't require active development, but verify it fits your documentation workflow before adopting.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- Dormant maintenance since January 2024 (948 days), though the repository remains active and supports current Python versions (3.8–3.12).
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open and closed projects.
last release 2024-01-09 (948 days) · last repo commit 2024-01-09 · 10 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 439,416 downloads/mo, #6,656 on PyPI
Alternatives
Verify before relying
pip install attributes-doc
from attributes_doc import attributes_doc
@attributes_doc
class Foo:
bar = 1
"""Docstring for bar."""
print(Foo.__doc_bar__)- Whether the package is actively maintained or accepting contributions despite dormant status
- Real-world adoption rate beyond the 439416 monthly downloads figure
What it is and 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.
The 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.
Use it for
- 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
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
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—suitable for projects that don't require active development, but verify it fits your documentation workflow before adopting.
Install
attributes-doc on PyPI
Before you install
Low install friction with no runtime dependencies. Dormant maintenance since January 2024 (948 days), though the repository remains active and supports current Python versions (3.8–3.12).
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open and closed projects.
Quickstart
pip install attributes-doc
from attributes_doc import attributes_doc
@attributes_doc
class Foo:
bar = 1
"""Docstring for bar."""
print(Foo.__doc_bar__)
Verify before relying
- Whether the package is actively maintained or accepting contributions despite dormant status
- Real-world adoption rate beyond the 439416 monthly downloads figure
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 948 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 439,416 / month, #6,656 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming 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 Modules |
Evidence: attributes_doc-0.4.0-py2.py3-none-any.whl
Tags
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 › “attribute docstrings runtime”
- attributes-docExtracts and stores docstrings for class attributes at runtime,…
- flake8-class-attributes-orderA flake8 extension that enforces a configurable order for class…
- docstring-parser-forkParses Python docstrings in ReST, Google, Numpydoc, and Epydoc…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
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.
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.
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.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
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…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also enum-tools · docformatter · docrep · pydocstringformatter · docstr-coverage · docstring-inheritance · docstring-parser · mkdocstrings-python-legacy · nameof · annotated-doc