Skip to main content

Griffe extension adding support for data-class like things (pydantic, attrs, etc...)

Project description

griffe-fieldz

License PyPI Python Version CI codecov

Griffe extension adding support for data-class like things (pydantic, attrs, etc...). This extension will inject the fields of the data-class into the documentation, preventing you from duplicating field metadata in your docstrings.

It supports anything that fieldz supports, which is currently:

Installation

With pip:

pip install griffe-fieldz

To use the extension in a MkDocs project, use this configuration:

# mkdocs.yml
plugins:
- mkdocstrings:
    handlers:
      python:
        options:
          extensions:
          - griffe_fieldz

You may use any of the following options, provided as a dictionary under the griffe_fieldz key.

Option Description Default
include_inherited Include inherited fields in class parameters. False
include_private Include private fields in the documentation. False

For example:

        options:
          extensions:
          - griffe_fieldz: {include_inherited: true}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

griffe_fieldz-0.1.2.tar.gz (8.3 kB view hashes)

Uploaded Source

Built Distribution

griffe_fieldz-0.1.2-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page