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.1.tar.gz
(8.3 kB
view hashes)
Built Distribution
Close
Hashes for griffe_fieldz-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c403a1997efa127dab225e933aaf4c8530e43667debce15efb0348229f4688bf |
|
MD5 | bf280880004e1be01f8013aeae73a6be |
|
BLAKE2b-256 | bd861d07ed26073e39006141c3975f686ea0bfbc2ed50ecf94bf4c6649cf3f9f |