{"id":45836299,"url":"https://github.com/gesslerpd/runtime-docstrings","last_synced_at":"2026-02-26T23:04:16.339Z","repository":{"id":305984328,"uuid":"1024590264","full_name":"gesslerpd/runtime-docstrings","owner":"gesslerpd","description":"Runtime access to Python class attribute docstrings (PEP 224)","archived":false,"fork":false,"pushed_at":"2025-11-12T02:26:26.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-12T04:19:56.344Z","etag":null,"topics":["ast","autodoc","class-attributes","dataclasses","docstrings","enum","error-reporting","pep-224","python","sphinx"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/runtime-docstrings/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gesslerpd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-23T00:30:35.000Z","updated_at":"2025-11-12T02:24:56.000Z","dependencies_parsed_at":"2025-07-23T03:09:08.995Z","dependency_job_id":"21ae744c-426f-4633-a5af-0e0e7f770c73","html_url":"https://github.com/gesslerpd/runtime-docstrings","commit_stats":null,"previous_names":["gesslerpd/runtime-docs"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/gesslerpd/runtime-docstrings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesslerpd%2Fruntime-docstrings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesslerpd%2Fruntime-docstrings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesslerpd%2Fruntime-docstrings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesslerpd%2Fruntime-docstrings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gesslerpd","download_url":"https://codeload.github.com/gesslerpd/runtime-docstrings/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gesslerpd%2Fruntime-docstrings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29876367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T22:37:10.609Z","status":"ssl_error","status_checked_at":"2026-02-26T22:37:09.019Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","autodoc","class-attributes","dataclasses","docstrings","enum","error-reporting","pep-224","python","sphinx"],"created_at":"2026-02-26T23:04:14.841Z","updated_at":"2026-02-26T23:04:16.316Z","avatar_url":"https://github.com/gesslerpd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# runtime-docstrings\n\nRuntime access to Python class attribute docstrings (PEP 224)\n\n## Installation\n\n```bash\npip install runtime-docstrings\n```\n\n## Usage\n\n### Class\n\n```python\nfrom runtime_docstrings import docstrings, get_docstrings\n\n@docstrings\nclass Person:\n    \"\"\"A person with various attributes.\"\"\"\n    \n    name: str\n    \"\"\"The person's full name.\"\"\"\n\n    email: str\n    \"\"\"Contact email address.\"\"\"\n\n    age: int = 0\n    \"\"\"The person's age in years.\"\"\"\n\n# Access docstrings map directly on class (IDE style)\ndocs = get_docstrings(Person)\nprint(docs[\"name\"])    # \"The person's full name.\"\nprint(docs[\"age\"])     # \"The person's age in years.\"\nprint(docs[\"email\"])   # \"Contact email address.\"\n\n# Access via PEP 224 style attributes (uses Python MRO lookup)\nprint(Person.__doc_name__)   # \"The person's full name.\"\nprint(Person.__doc_age__)    # \"The person's age in years.\"\nprint(Person.__doc_email__)  # \"Contact email address.\"\n```\n\n### Enum\n\n```python\nfrom enum import Enum\nfrom runtime_docstrings import docstrings\n\n@docstrings\nclass Status(Enum):\n    \"\"\"Status enumeration for task tracking.\"\"\"\n    \n    PENDING = \"pending\"\n    \"\"\"Task is waiting to be processed.\"\"\"\n    \n    RUNNING = \"running\"\n    \"\"\"Task is currently being executed.\"\"\"\n    \n    COMPLETED = \"completed\"\n    \"\"\"Task has finished successfully.\"\"\"\n    \n    FAILED = \"failed\"\n    \"\"\"Task encountered an error.\"\"\"\n\n# Supports all the standard class access patterns\n\n# Access via enum member __doc__ attribute\nprint(Status.PENDING.__doc__)    # \"Task is waiting to be processed.\"\nprint(Status.COMPLETED.__doc__)  # \"Task has finished successfully.\"\n\n# Iterate through all members with their documentation\nfor member in Status:\n    if member.__doc__:\n        print(f\"{member.name}: {member.__doc__}\")\n```\n\n### Dataclass\n\n```python\nfrom dataclasses import dataclass, fields\nfrom runtime_docstrings import docstrings, get_docstrings\n\n@docstrings\n@dataclass\nclass Product:\n    \"\"\"A product in an e-commerce system.\"\"\"\n    \n    name: str\n    \"\"\"Product name.\"\"\"\n    \n    price: float\n    \"\"\"Price in USD.\"\"\"\n\n    category: str = \"\"\n    \"\"\"Product category.\"\"\"\n    \n    description: str = \"\"\n    \"\"\"Detailed product description.\"\"\"\n\n# Supports all the standard class access patterns\n\n# Access via dataclass field metadata\nfor field in fields(Product):\n    if field.metadata.get(\"__doc__\"):\n        print(f\"{field.name}: {field.metadata['__doc__']}\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgesslerpd%2Fruntime-docstrings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgesslerpd%2Fruntime-docstrings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgesslerpd%2Fruntime-docstrings/lists"}