Griffe extension adding support for data-class like things (pydantic, attrs, etc...)
Project description
griffe-fieldz
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.2.0.tar.gz
(7.8 kB
view hashes)
Built Distribution
Close
Hashes for griffe_fieldz-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2ebb0c63e7b660ddcc7c94237c6309a6bce998552b8c3483f0c14016fabf949 |
|
MD5 | cc24f24d452f11fe7d505918c2e7643f |
|
BLAKE2b-256 | 24c29fb0cb0023d14d6a443e8215a5d67393d2a93e41a4ba26e5a1393d433172 |