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
Built Distribution
File details
Details for the file griffe_fieldz-0.2.0.tar.gz
.
File metadata
- Download URL: griffe_fieldz-0.2.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fba1ecadb4d19e7f1c7b87e13caadd426f7066bd8f4bbb53615bd035bf67be58 |
|
MD5 | 6c5a69932aabd318f3ae3250f9e2df3f |
|
BLAKE2b-256 | acbf36adba8f47bcbbcfe9950649b35be62d2fc567229a541af24db0ef37c2a3 |
File details
Details for the file griffe_fieldz-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: griffe_fieldz-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2ebb0c63e7b660ddcc7c94237c6309a6bce998552b8c3483f0c14016fabf949 |
|
MD5 | cc24f24d452f11fe7d505918c2e7643f |
|
BLAKE2b-256 | 24c29fb0cb0023d14d6a443e8215a5d67393d2a93e41a4ba26e5a1393d433172 |