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
- 📚 sorts fields, validators and model config within models by type
- 🍀 Supports
pydantic >= 1.5.0andsphinx >= 3.4.0
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.
Documentation
For more details, please visit the official documentation:
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 1.9.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 | Provenance | Actions |
|---|---|---|---|---|
| autodoc_pydantic-1.9.0.tar.gz | 27.3 kB | Without provenance | Details for autodoc_pydantic-1.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autodoc_pydantic-1.9.0-py3-none-any.whl | Python 3 | none | any | Details for autodoc_pydantic-1.9.0-py3-none-any.whl |
Total release size: 57.3 kB
Release files / autodoc_pydantic-1.9.0.tar.gz
| Download URL | autodoc_pydantic-1.9.0.tar.gz |
|---|---|
| Size | 27.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f35f8051abe77b5ae16d8a1084c47a5871435e2ca9060e36c838d063c03cc89
|
|
BLAKE2b-256 checksum How to use checksums |
cca7d36b6a0004f5d6b754666f9803aafe46e2625f323c02352a9288fdcf8eaa
|
| 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-1040-azure
|
Release files / autodoc_pydantic-1.9.0-py3-none-any.whl
| Download URL | autodoc_pydantic-1.9.0-py3-none-any.whl |
|---|---|
| Size | 29.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbf7ec2f27f913629bd38f9944fa6c4a86541c3cadba4a6fa9d2079e500223d8
|
|
BLAKE2b-256 checksum How to use checksums |
a5840cddbad4050c5f1bc62e858619c7f8282746bfb9c230b2507501253e7f43
|
| 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-1040-azure
|
Security for autodoc_pydantic 1.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.