Sphinx extension for documenting Pydantic models.
Project description
pydantic-kitbash
Kitbash is a Sphinx extension that automates the generation of reference documentation for Pydantic models.
Kitbash parses a model to describe its fields in a Sphinx document. It can target an entire model or specific fields. When covering a specific field, you can add reStructuredText to the field's docstring to supplement the standard output.
Basic usage
To document an individual field, add the kitbash-field directive to your document:
.. kitbash-field:: <model-name> <field-name>
If you'd prefer to document an entire model, add the kitbash-model directive to your
document:
.. kitbash-model:: <model-name>
Project setup
Kitbash is published on PyPI and can be installed with:
pip install pydantic-kitbash
After adding Kitbash to your Python project, update Sphinx's conf.py file to include
Kitbash as one of its extensions:
extensions = [
"pydantic_kitbash",
]
Community and support
You can report any issues or bugs on the project's GitHub repository.
Kitbash is covered by the Ubuntu Code of Conduct.
License and copyright
Kitbash is released under the LGPL-3.0 license.
@ 2025 Canonical Ltd.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydantic_kitbash-0.0.8.tar.gz.
File metadata
- Download URL: pydantic_kitbash-0.0.8.tar.gz
- Upload date:
- Size: 133.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7ca7206dadb40962f969613c9e3cbe5d411208bda24ab745270101c21955e36
|
|
| MD5 |
daf73b993be4687e6b6a4360a603d0c3
|
|
| BLAKE2b-256 |
89cfba829d9cb8dea479f3b495ad3ebae15136f036f193da5e1b2b684361d477
|
Provenance
The following attestation bundles were made for pydantic_kitbash-0.0.8.tar.gz:
Publisher:
release-publish.yaml on canonical/pydantic-kitbash
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydantic_kitbash-0.0.8.tar.gz -
Subject digest:
d7ca7206dadb40962f969613c9e3cbe5d411208bda24ab745270101c21955e36 - Sigstore transparency entry: 465618233
- Sigstore integration time:
-
Permalink:
canonical/pydantic-kitbash@e9217261844ed8b3e87aafbd0f4678ad2d15397a -
Branch / Tag:
refs/tags/0.0.8 - Owner: https://github.com/canonical
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
release-publish.yaml@e9217261844ed8b3e87aafbd0f4678ad2d15397a -
Trigger Event:
push
-
Statement type:
File details
Details for the file pydantic_kitbash-0.0.8-py3-none-any.whl.
File metadata
- Download URL: pydantic_kitbash-0.0.8-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63e793bac0b570c34d0bb6de3e96cb8ff1f0a8a83636b53f6da8530fa8f9c7f6
|
|
| MD5 |
4f3b0c23d8d4ca741d1880623912b437
|
|
| BLAKE2b-256 |
d4c4104ef0c4e212ed915e61d43aaf9dd27224aae9029a31db0986aebdb3859e
|
Provenance
The following attestation bundles were made for pydantic_kitbash-0.0.8-py3-none-any.whl:
Publisher:
release-publish.yaml on canonical/pydantic-kitbash
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydantic_kitbash-0.0.8-py3-none-any.whl -
Subject digest:
63e793bac0b570c34d0bb6de3e96cb8ff1f0a8a83636b53f6da8530fa8f9c7f6 - Sigstore transparency entry: 465618280
- Sigstore integration time:
-
Permalink:
canonical/pydantic-kitbash@e9217261844ed8b3e87aafbd0f4678ad2d15397a -
Branch / Tag:
refs/tags/0.0.8 - Owner: https://github.com/canonical
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
release-publish.yaml@e9217261844ed8b3e87aafbd0f4678ad2d15397a -
Trigger Event:
push
-
Statement type: