You love pydantic ❤ and you want to document your models and configuration settings with sphinx?
Perfect, let's go. But wait, sphinx' autodoc does not integrate too well with pydantic models 😕.
Don't worry - just pip install autodoc_pydantic ☺.
Features
- 💬 provides default values, alias and constraints for model fields
- 🔗 adds hyperlinks between validators and corresponding fields
- 📃 includes collapsable model json schema
- 🏄 natively integrates with autodoc and autosummary extensions
- 📎 defines explicit pydantic prefixes for models, settings, fields, validators and model config
- 📋 shows summary section for model configuration, fields and validators
- 👀 hides overloaded and redundant model class signature
- 🔱 visualizes entity-relationship-diagrams for class hierarchies
- 🍀 Supports
pydantic >= 1.5.0andsphinx >= 4.0.0
Documentation
For more details, please visit the official documentation:
Comparison between autodoc sphinx and autodoc pydantic
To see those features in action, jump over to the example documentation to compare the appearance of standard sphinx autodoc with autodoc_pydantic.
Acknowledgements
Thanks to great open source projects sphinx, pydantic and poetry (and so many more) ❤ in addition to the following contributors:
This project follows the all-contributors specification. Contributions of any kind welcome!
Metadata
Release files for autodoc_pydantic 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| autodoc_pydantic-2.0.0.tar.gz | 28.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| autodoc_pydantic-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 58.9 kB
Release files / autodoc_pydantic-2.0.0.tar.gz
| Download URL | autodoc_pydantic-2.0.0.tar.gz |
|---|---|
| Size | 28.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4cfd6573631f498a26c3597bfa6c79fd962aef5feaf44917d35dbad7048f4f1c
|
|
BLAKE2b-256 checksum How to use checksums |
5e76cb451b174281085aec780a73f79a4fc8cbe0a986c56fd3bb4df5e1efd202
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.12 Linux/5.15.0-1041-azure
|
Release files / autodoc_pydantic-2.0.0-py3-none-any.whl
| Download URL | autodoc_pydantic-2.0.0-py3-none-any.whl |
|---|---|
| Size | 30.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ac5315064ccac214c48348918eef05b67b8bea6e56a6257a220e2b1cc064f82
|
|
BLAKE2b-256 checksum How to use checksums |
cecebb56b4e4dff62605e5bf568b4aab45493ee4c226feeff558a43b35fd0562
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.12 Linux/5.15.0-1041-azure
|