Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydantic_kitbash-0.0.3.tar.gz (116.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydantic_kitbash-0.0.3-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file pydantic_kitbash-0.0.3.tar.gz.

File metadata

  • Download URL: pydantic_kitbash-0.0.3.tar.gz
  • Upload date:
  • Size: 116.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pydantic_kitbash-0.0.3.tar.gz
Algorithm Hash digest
SHA256 d86c490f7aa31e465910e8d057ef6921fbe9ae001b3b84e8032a7e1f6687e43f
MD5 ccdb4252c59010389f8132495afdf24d
BLAKE2b-256 b135c4ad89e9a866c5473685afabaf1ce4dbcd7988b966d7f5b1eb6ac8463c06

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydantic_kitbash-0.0.3.tar.gz:

Publisher: release-publish.yaml on canonical/pydantic-kitbash

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pydantic_kitbash-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pydantic_kitbash-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d12f0ea24d95a26f96a3911b8ac9967ff26d4a0fc38b21f19132279231b82e96
MD5 6aa0714f2dcc4474e1a6a71560636b7e
BLAKE2b-256 d2db4c4563ae8597425ea5d7e38aaa75ccdc0a3716a016c653448f5fe074acdd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydantic_kitbash-0.0.3-py3-none-any.whl:

Publisher: release-publish.yaml on canonical/pydantic-kitbash

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page