autodoc_pydantic2.2.0
autodoc_pydantic2.2.0
Published
Seamlessly integrate pydantic models in your Sphinx documentation.
pip install autodoc-pydantic
Package Downloads
Authors
Project URLs
Requires Python
<4.0.0,>=3.8.1
Dependencies
- Sphinx
>=4.0
- pydantic
<3.0.0,>=2.0
- pydantic-settings
<3.0.0,>=2.0
- importlib-metadata
>1; python_version <= "3.8"
- sphinx-rtd-theme
<3.0.0,>=2.0.0; extra == "docs"
- sphinx-tabs
<4,>=3; extra == "docs"
- sphinx-copybutton
<0.6.0,>=0.5.0; extra == "docs"
- sphinxcontrib-mermaid
<0.10.0,>=0.9.0; extra == "docs"
- myst-parser
<4.0.0,>=3.0.0; extra == "docs"
- pytest
<9.0.0,>=8.0.0; extra == "test"
- pytest-sugar
<2.0.0,>=1.0.0; extra == "test"
- coverage
<8,>=7; extra == "test"
- defusedxml
>=0.7.1; extra == "test"
- mypy
<2.0,>=1.9; extra == "type-checking"
- types-docutils
<0.21,>=0.20; extra == "type-checking"
- typing-extensions
<5.0,>=4.11; python_version <= "3.9" and extra == "type-checking"
- ruff
<0.5.0,>=0.4.0; extra == "linting"
- pip-audit
<3.0.0,>=2.7.2; extra == "security"
- erdantic
<2.0; extra == "erdantic"
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
- π¨ allows complete configurability on global and per-model level
- π supports
pydantic >= 1.5.0
andsphinx >= 4.0.0
π Documentation
Section | Description |
---|---|
π Landing Page | Guides and detailed information. |
π οΈ Installation | Setup and installation procedures. |
π§ Configuration | System or application settings. |
π‘ Usage | How to use the application or tool. |
π Examples | Showcase and usage examples. |
π¨βπ» Developer Guide | In-depth guide for developers. |
π 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!