dynadoc


Namedynadoc JSON
Version 1.3 PyPI version JSON
download
home_pageNone
SummaryDocstring generation from annotations with configurable output formats.
upload_time2025-07-13 01:34:57
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords pep 727 annotations docstring dynamic introspection
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. vim: set fileencoding=utf-8:
.. -*- coding: utf-8 -*-
.. +--------------------------------------------------------------------------+
   |                                                                          |
   | Licensed under the Apache License, Version 2.0 (the "License");          |
   | you may not use this file except in compliance with the License.         |
   | You may obtain a copy of the License at                                  |
   |                                                                          |
   |     http://www.apache.org/licenses/LICENSE-2.0                           |
   |                                                                          |
   | Unless required by applicable law or agreed to in writing, software      |
   | distributed under the License is distributed on an "AS IS" BASIS,        |
   | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
   | See the License for the specific language governing permissions and      |
   | limitations under the License.                                           |
   |                                                                          |
   +--------------------------------------------------------------------------+

*******************************************************************************
                                    dynadoc
*******************************************************************************

.. image:: https://img.shields.io/pypi/v/dynadoc
   :alt: Package Version
   :target: https://pypi.org/project/dynadoc/

.. image:: https://img.shields.io/pypi/status/dynadoc
   :alt: PyPI - Status
   :target: https://pypi.org/project/dynadoc/

.. image:: https://github.com/emcd/python-dynadoc/actions/workflows/tester.yaml/badge.svg?branch=master&event=push
   :alt: Tests Status
   :target: https://github.com/emcd/python-dynadoc/actions/workflows/tester.yaml

.. image:: https://emcd.github.io/python-dynadoc/coverage.svg
   :alt: Code Coverage Percentage
   :target: https://github.com/emcd/python-dynadoc/actions/workflows/tester.yaml

.. image:: https://img.shields.io/github/license/emcd/python-dynadoc
   :alt: Project License
   :target: https://github.com/emcd/python-dynadoc/blob/master/LICENSE.txt

.. image:: https://img.shields.io/pypi/pyversions/dynadoc
   :alt: Python Versions
   :target: https://pypi.org/project/dynadoc/


📝 A Python library package which bridges the gap between **rich annotations**
and **automatic documentation generation** with configurable renderers and
support for reusable fragments.


Key Features ⭐
===============================================================================

* 🔄 **Docstring Generation**: Generation of docstrings for modules, classes,
  functions, and methods via introspection with fine-grained control.
* 🧩 **Fragment System**: Reusable documentation snippets for consistent
  terminology across projects.
* 🏷️ **Annotation Metadata**: Extraction and inclusion of metadata from
  annotations into generated docstrings.
* 🔌 **Extensible Architecture**: Custom renderers, attribute visibility rules,
  and introspection limiters.
* 📖 **Sphinx-Compatible Output**: Render reStructuredText docstrings that work
  with Sphinx Autodoc out of the box.
* 🎨 **Configurable Renderers**: Ability to extend with other renderers as
  desired.


Installation 📦
===============================================================================

Method: Install Python Package
-------------------------------------------------------------------------------

Install via `uv <https://github.com/astral-sh/uv/blob/main/README.md>`_ ``pip``
command:

::

    uv pip install dynadoc

Or, install via ``pip``:

::

    pip install dynadoc


Examples 💡
===============================================================================

Please see the `examples directory
<https://github.com/emcd/python-dynadoc/tree/master/documentation/examples>`_.

**Function Documentation**:

.. code-block:: python

    import dynadoc
    from typing import Annotated

    @dynadoc.with_docstring( )
    def process_api_data(
        endpoint: Annotated[ str, dynadoc.Doc( "API endpoint URL to query" ) ],
        timeout: Annotated[ float, dynadoc.Doc( "Request timeout in seconds" ) ] = 30.0,
    ) -> Annotated[ dict, dynadoc.Doc( "Processed API response data" ) ]:
        ''' Process data from API endpoint with configurable timeout. '''
        return { }

Which will be turned into the following docstring on the function by the
default renderer:

.. code-block:: text

    Process data from API endpoint with configurable timeout.

    :argument endpoint: API endpoint URL to query
    :type endpoint: str
    :argument timeout: Request timeout in seconds
    :type timeout: float
    :returns: Processed API response data
    :rtype: dict

**Module Documentation**:

Document all annotated attributes in current module:

.. code-block:: python

    import dynadoc

    dynadoc.assign_module_docstring( __name__ )


Contribution 🤝
===============================================================================

Contribution to this project is welcome! However, it must follow the `code of
conduct
<https://emcd.github.io/python-project-common/stable/sphinx-html/common/conduct.html>`_
for the project.

Please file bug reports and feature requests in the `issue tracker
<https://github.com/emcd/python-dynadoc/issues>`_ or submit `pull
requests <https://github.com/emcd/python-dynadoc/pulls>`_ to
improve the source code or documentation.

For development guidance and standards, please see the `development guide
<https://emcd.github.io/python-dynadoc/stable/sphinx-html/contribution.html#development>`_.


`More Flair <https://www.imdb.com/title/tt0151804/characters/nm0431918>`_
===============================================================================

.. image:: https://img.shields.io/github/last-commit/emcd/python-dynadoc
   :alt: GitHub last commit
   :target: https://github.com/emcd/python-dynadoc

.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-orange.json
   :alt: Copier
   :target: https://github.com/copier-org/copier

.. image:: https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg
   :alt: Hatch
   :target: https://github.com/pypa/hatch

.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit
   :alt: pre-commit
   :target: https://github.com/pre-commit/pre-commit

.. image:: https://microsoft.github.io/pyright/img/pyright_badge.svg
   :alt: Pyright
   :target: https://microsoft.github.io/pyright

.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
   :alt: Ruff
   :target: https://github.com/astral-sh/ruff

.. image:: https://img.shields.io/pypi/implementation/dynadoc
   :alt: PyPI - Implementation
   :target: https://pypi.org/project/dynadoc/

.. image:: https://img.shields.io/pypi/wheel/dynadoc
   :alt: PyPI - Wheel
   :target: https://pypi.org/project/dynadoc/


Other Projects by This Author 🌟
===============================================================================


* `python-absence <https://github.com/emcd/python-absence>`_ (`absence <https://pypi.org/project/absence/>`_ on PyPI)

  🕳️ A Python library package which provides a **sentinel for absent values** - a falsey, immutable singleton that represents the absence of a value in contexts where ``None`` or ``False`` may be valid values.
* `python-accretive <https://github.com/emcd/python-accretive>`_ (`accretive <https://pypi.org/project/accretive/>`_ on PyPI)

  🌌 A Python library package which provides **accretive data structures** - collections which can grow but never shrink.
* `python-classcore <https://github.com/emcd/python-classcore>`_ (`classcore <https://pypi.org/project/classcore/>`_ on PyPI)

  🏭 A Python library package which provides **foundational class factories and decorators** for providing classes with attributes immutability and concealment and other custom behaviors.
* `python-falsifier <https://github.com/emcd/python-falsifier>`_ (`falsifier <https://pypi.org/project/falsifier/>`_ on PyPI)

  🎭 A very simple Python library package which provides a **base class for falsey objects** - objects that evaluate to ``False`` in boolean contexts.
* `python-frigid <https://github.com/emcd/python-frigid>`_ (`frigid <https://pypi.org/project/frigid/>`_ on PyPI)

  🔒 A Python library package which provides **immutable data structures** - collections which cannot be modified after creation.
* `python-icecream-truck <https://github.com/emcd/python-icecream-truck>`_ (`icecream-truck <https://pypi.org/project/icecream-truck/>`_ on PyPI)

  🍦 **Flavorful Debugging** - A Python library which enhances the powerful and well-known ``icecream`` package with flavored traces, configuration hierarchies, customized outputs, ready-made recipes, and more.
* `python-mimeogram <https://github.com/emcd/python-mimeogram>`_ (`mimeogram <https://pypi.org/project/mimeogram/>`_ on PyPI)

  📨 A command-line tool for **exchanging collections of files with Large Language Models** - bundle multiple files into a single clipboard-ready document while preserving directory structure and metadata... good for code reviews, project sharing, and LLM interactions.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dynadoc",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "PEP 727, annotations, docstring, dynamic, introspection",
    "author": null,
    "author_email": "Eric McDonald <emcd@users.noreply.github.com>",
    "download_url": "https://files.pythonhosted.org/packages/30/52/f1553f19e96860219a1bf7efd3e358657e61b49cc6658af06815595f33a5/dynadoc-1.3.tar.gz",
    "platform": null,
    "description": ".. vim: set fileencoding=utf-8:\n.. -*- coding: utf-8 -*-\n.. +--------------------------------------------------------------------------+\n   |                                                                          |\n   | Licensed under the Apache License, Version 2.0 (the \"License\");          |\n   | you may not use this file except in compliance with the License.         |\n   | You may obtain a copy of the License at                                  |\n   |                                                                          |\n   |     http://www.apache.org/licenses/LICENSE-2.0                           |\n   |                                                                          |\n   | Unless required by applicable law or agreed to in writing, software      |\n   | distributed under the License is distributed on an \"AS IS\" BASIS,        |\n   | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |\n   | See the License for the specific language governing permissions and      |\n   | limitations under the License.                                           |\n   |                                                                          |\n   +--------------------------------------------------------------------------+\n\n*******************************************************************************\n                                    dynadoc\n*******************************************************************************\n\n.. image:: https://img.shields.io/pypi/v/dynadoc\n   :alt: Package Version\n   :target: https://pypi.org/project/dynadoc/\n\n.. image:: https://img.shields.io/pypi/status/dynadoc\n   :alt: PyPI - Status\n   :target: https://pypi.org/project/dynadoc/\n\n.. image:: https://github.com/emcd/python-dynadoc/actions/workflows/tester.yaml/badge.svg?branch=master&event=push\n   :alt: Tests Status\n   :target: https://github.com/emcd/python-dynadoc/actions/workflows/tester.yaml\n\n.. image:: https://emcd.github.io/python-dynadoc/coverage.svg\n   :alt: Code Coverage Percentage\n   :target: https://github.com/emcd/python-dynadoc/actions/workflows/tester.yaml\n\n.. image:: https://img.shields.io/github/license/emcd/python-dynadoc\n   :alt: Project License\n   :target: https://github.com/emcd/python-dynadoc/blob/master/LICENSE.txt\n\n.. image:: https://img.shields.io/pypi/pyversions/dynadoc\n   :alt: Python Versions\n   :target: https://pypi.org/project/dynadoc/\n\n\n\ud83d\udcdd A Python library package which bridges the gap between **rich annotations**\nand **automatic documentation generation** with configurable renderers and\nsupport for reusable fragments.\n\n\nKey Features \u2b50\n===============================================================================\n\n* \ud83d\udd04 **Docstring Generation**: Generation of docstrings for modules, classes,\n  functions, and methods via introspection with fine-grained control.\n* \ud83e\udde9 **Fragment System**: Reusable documentation snippets for consistent\n  terminology across projects.\n* \ud83c\udff7\ufe0f **Annotation Metadata**: Extraction and inclusion of metadata from\n  annotations into generated docstrings.\n* \ud83d\udd0c **Extensible Architecture**: Custom renderers, attribute visibility rules,\n  and introspection limiters.\n* \ud83d\udcd6 **Sphinx-Compatible Output**: Render reStructuredText docstrings that work\n  with Sphinx Autodoc out of the box.\n* \ud83c\udfa8 **Configurable Renderers**: Ability to extend with other renderers as\n  desired.\n\n\nInstallation \ud83d\udce6\n===============================================================================\n\nMethod: Install Python Package\n-------------------------------------------------------------------------------\n\nInstall via `uv <https://github.com/astral-sh/uv/blob/main/README.md>`_ ``pip``\ncommand:\n\n::\n\n    uv pip install dynadoc\n\nOr, install via ``pip``:\n\n::\n\n    pip install dynadoc\n\n\nExamples \ud83d\udca1\n===============================================================================\n\nPlease see the `examples directory\n<https://github.com/emcd/python-dynadoc/tree/master/documentation/examples>`_.\n\n**Function Documentation**:\n\n.. code-block:: python\n\n    import dynadoc\n    from typing import Annotated\n\n    @dynadoc.with_docstring( )\n    def process_api_data(\n        endpoint: Annotated[ str, dynadoc.Doc( \"API endpoint URL to query\" ) ],\n        timeout: Annotated[ float, dynadoc.Doc( \"Request timeout in seconds\" ) ] = 30.0,\n    ) -> Annotated[ dict, dynadoc.Doc( \"Processed API response data\" ) ]:\n        ''' Process data from API endpoint with configurable timeout. '''\n        return { }\n\nWhich will be turned into the following docstring on the function by the\ndefault renderer:\n\n.. code-block:: text\n\n    Process data from API endpoint with configurable timeout.\n\n    :argument endpoint: API endpoint URL to query\n    :type endpoint: str\n    :argument timeout: Request timeout in seconds\n    :type timeout: float\n    :returns: Processed API response data\n    :rtype: dict\n\n**Module Documentation**:\n\nDocument all annotated attributes in current module:\n\n.. code-block:: python\n\n    import dynadoc\n\n    dynadoc.assign_module_docstring( __name__ )\n\n\nContribution \ud83e\udd1d\n===============================================================================\n\nContribution to this project is welcome! However, it must follow the `code of\nconduct\n<https://emcd.github.io/python-project-common/stable/sphinx-html/common/conduct.html>`_\nfor the project.\n\nPlease file bug reports and feature requests in the `issue tracker\n<https://github.com/emcd/python-dynadoc/issues>`_ or submit `pull\nrequests <https://github.com/emcd/python-dynadoc/pulls>`_ to\nimprove the source code or documentation.\n\nFor development guidance and standards, please see the `development guide\n<https://emcd.github.io/python-dynadoc/stable/sphinx-html/contribution.html#development>`_.\n\n\n`More Flair <https://www.imdb.com/title/tt0151804/characters/nm0431918>`_\n===============================================================================\n\n.. image:: https://img.shields.io/github/last-commit/emcd/python-dynadoc\n   :alt: GitHub last commit\n   :target: https://github.com/emcd/python-dynadoc\n\n.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-orange.json\n   :alt: Copier\n   :target: https://github.com/copier-org/copier\n\n.. image:: https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg\n   :alt: Hatch\n   :target: https://github.com/pypa/hatch\n\n.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\n   :alt: pre-commit\n   :target: https://github.com/pre-commit/pre-commit\n\n.. image:: https://microsoft.github.io/pyright/img/pyright_badge.svg\n   :alt: Pyright\n   :target: https://microsoft.github.io/pyright\n\n.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\n   :alt: Ruff\n   :target: https://github.com/astral-sh/ruff\n\n.. image:: https://img.shields.io/pypi/implementation/dynadoc\n   :alt: PyPI - Implementation\n   :target: https://pypi.org/project/dynadoc/\n\n.. image:: https://img.shields.io/pypi/wheel/dynadoc\n   :alt: PyPI - Wheel\n   :target: https://pypi.org/project/dynadoc/\n\n\nOther Projects by This Author \ud83c\udf1f\n===============================================================================\n\n\n* `python-absence <https://github.com/emcd/python-absence>`_ (`absence <https://pypi.org/project/absence/>`_ on PyPI)\n\n  \ud83d\udd73\ufe0f A Python library package which provides a **sentinel for absent values** - a falsey, immutable singleton that represents the absence of a value in contexts where ``None`` or ``False`` may be valid values.\n* `python-accretive <https://github.com/emcd/python-accretive>`_ (`accretive <https://pypi.org/project/accretive/>`_ on PyPI)\n\n  \ud83c\udf0c A Python library package which provides **accretive data structures** - collections which can grow but never shrink.\n* `python-classcore <https://github.com/emcd/python-classcore>`_ (`classcore <https://pypi.org/project/classcore/>`_ on PyPI)\n\n  \ud83c\udfed A Python library package which provides **foundational class factories and decorators** for providing classes with attributes immutability and concealment and other custom behaviors.\n* `python-falsifier <https://github.com/emcd/python-falsifier>`_ (`falsifier <https://pypi.org/project/falsifier/>`_ on PyPI)\n\n  \ud83c\udfad A very simple Python library package which provides a **base class for falsey objects** - objects that evaluate to ``False`` in boolean contexts.\n* `python-frigid <https://github.com/emcd/python-frigid>`_ (`frigid <https://pypi.org/project/frigid/>`_ on PyPI)\n\n  \ud83d\udd12 A Python library package which provides **immutable data structures** - collections which cannot be modified after creation.\n* `python-icecream-truck <https://github.com/emcd/python-icecream-truck>`_ (`icecream-truck <https://pypi.org/project/icecream-truck/>`_ on PyPI)\n\n  \ud83c\udf66 **Flavorful Debugging** - A Python library which enhances the powerful and well-known ``icecream`` package with flavored traces, configuration hierarchies, customized outputs, ready-made recipes, and more.\n* `python-mimeogram <https://github.com/emcd/python-mimeogram>`_ (`mimeogram <https://pypi.org/project/mimeogram/>`_ on PyPI)\n\n  \ud83d\udce8 A command-line tool for **exchanging collections of files with Large Language Models** - bundle multiple files into a single clipboard-ready document while preserving directory structure and metadata... good for code reviews, project sharing, and LLM interactions.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Docstring generation from annotations with configurable output formats.",
    "version": "1.3",
    "project_urls": {
        "Documentation": "https://emcd.github.io/python-dynadoc",
        "Download": "https://pypi.org/project/dynadoc/#files",
        "Homepage": "https://github.com/emcd/python-dynadoc",
        "Issue Tracker": "https://github.com/emcd/python-dynadoc/issues",
        "Source Code": "https://github.com/emcd/python-dynadoc"
    },
    "split_keywords": [
        "pep 727",
        " annotations",
        " docstring",
        " dynamic",
        " introspection"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "048baf5c1c76e3c353a40316bd10637f2b80a95307e2617e32a93abfaa2afcbf",
                "md5": "1d82e511adcacb228874291686560ad2",
                "sha256": "79162844709c106656d55c4129e76c855d2dde0889377264c7ed21847756befa"
            },
            "downloads": -1,
            "filename": "dynadoc-1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1d82e511adcacb228874291686560ad2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 37844,
            "upload_time": "2025-07-13T01:34:55",
            "upload_time_iso_8601": "2025-07-13T01:34:55.094875Z",
            "url": "https://files.pythonhosted.org/packages/04/8b/af5c1c76e3c353a40316bd10637f2b80a95307e2617e32a93abfaa2afcbf/dynadoc-1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3052f1553f19e96860219a1bf7efd3e358657e61b49cc6658af06815595f33a5",
                "md5": "3b5c036b5dc4a4cca587642e2bb08847",
                "sha256": "689cd314dcce120e011fc506d9a8daac4b01a10c4f80bf7d17dd77127db74be6"
            },
            "downloads": -1,
            "filename": "dynadoc-1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "3b5c036b5dc4a4cca587642e2bb08847",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 28385,
            "upload_time": "2025-07-13T01:34:57",
            "upload_time_iso_8601": "2025-07-13T01:34:57.811088Z",
            "url": "https://files.pythonhosted.org/packages/30/52/f1553f19e96860219a1bf7efd3e358657e61b49cc6658af06815595f33a5/dynadoc-1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-13 01:34:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "emcd",
    "github_project": "python-dynadoc",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "dynadoc"
}
        
Elapsed time: 1.97319s