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.1.1.tar.gz
.
File metadata
- Download URL: griffe_fieldz-0.1.1.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebd5fbe763076f95616c5b09975d5affee3dc38d4be17c7aeec40d08167f05ba |
|
MD5 | 2a8893ab2c8fc6b1c6f398bda80662b3 |
|
BLAKE2b-256 | 5c3e947121c97d5c2c51141e0c3cb14286df60e776ab340733d69b4036386c84 |
File details
Details for the file griffe_fieldz-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: griffe_fieldz-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c403a1997efa127dab225e933aaf4c8530e43667debce15efb0348229f4688bf |
|
MD5 | bf280880004e1be01f8013aeae73a6be |
|
BLAKE2b-256 | bd861d07ed26073e39006141c3975f686ea0bfbc2ed50ecf94bf4c6649cf3f9f |