Skip to content

Griffe extension to inject field metadata into mkdocstrings (supports dataclasses, pydantic, attrs, and more)

License

Notifications You must be signed in to change notification settings

pyapp-kit/griffe-fieldz

Repository files navigation

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}

About

Griffe extension to inject field metadata into mkdocstrings (supports dataclasses, pydantic, attrs, and more)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages