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.1.2.tar.gz
(8.3 kB
view hashes)
Built Distribution
Close
Hashes for griffe_fieldz-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2528af30f5a1ff91c3a34e73225e3d173b80c28b3ba019bcadfde119b6344d98 |
|
MD5 | c2d54c9ec0c82bca57d1ce7275e6ea09 |
|
BLAKE2b-256 | a211ca440a51583162b3b3edfe52c166ce03be35450a21a6af9714728ccc70d7 |