Skip to main content

Autodoc Pydantic

PyPI version Python

Master Coverage

Downloads All Contributors

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 and sphinx >= 4.0.0

Documentation

For more details, please visit the official documentation:

Comparison between autodoc sphinx and autodoc pydantic

Comparison

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:

Franz Wöllert
Franz Wöllert

🚧 📖 ⚠️ 🖋
Yves Renier
Yves Renier

📖 ⚠️ 🖋
TheBeardedBerserkr
TheBeardedBerserkr

🤔
Jan Vlčinský
Jan Vlčinský

🛡️
antvig
antvig

🐛 📓
Hugo O Rivera
Hugo O Rivera

🤔
yura bondarenko
yura bondarenko

🐛 📓
Trevor Howard
Trevor Howard

🐛 📓
thomas-pedot
thomas-pedot

🐛 📓
Mat Utter
Mat Utter

🐛 📓
David C Hall
David C Hall

🤔 📓
Josh A. Mitchell
Josh A. Mitchell

🤔 ⚠️
Roderick Go
Roderick Go

⚠️
Lily Wang
Lily Wang

📖 🖋
j-carson
j-carson

🐛 💻 ⚠️
Jakob Lykke Andersen
Jakob Lykke Andersen

💻
Juan Luis Cano Rodríguez
Juan Luis Cano Rodríguez

🖋
Mikalai Chaly
Mikalai Chaly

🐛 ⚠️
Stig Korsnes
Stig Korsnes

🐛 🤔
Ilia Kurenkov
Ilia Kurenkov

🐛
Grzegorz Bokota
Grzegorz Bokota

🐛
jgunstone
jgunstone

🐛
iwyrkore
iwyrkore

💻
spacemanspiff2007
spacemanspiff2007

🐛 🤔
Luke Hsiao
Luke Hsiao

🐛
Daniel Walker
Daniel Walker

🐛
Evgeniy Lupashin
Evgeniy Lupashin

🐛
Jan-Hendrik Ewers
Jan-Hendrik Ewers

🐛
Jonny Saunders
Jonny Saunders

🐛
Charles Machalow
Charles Machalow

💬
Thomas Karaouzene
Thomas Karaouzene

🐛
caseyzak24
caseyzak24

📖
Priscila Oliveira
Priscila Oliveira

👀 📓
Arthur Woimbée
Arthur Woimbée

👀 📓 💻 ⚠️
Chris Markiewicz
Chris Markiewicz

🐛
David B. Nagle
David B. Nagle

🐛
JerryJia
JerryJia

💻
Mike D
Mike D

💻 🐛 ⚠️
Dario Quintero (Flexcompute)
Dario Quintero (Flexcompute)

👀
Rafael Guedes
Rafael Guedes

💻
Andrew Linzie
Andrew Linzie

💻
Altay Sansal
Altay Sansal

🤔
Tony Narlock
Tony Narlock

💻 📖
Xuan (Sean) Hu
Xuan (Sean) Hu

🐛
Christian Riedel
Christian Riedel

🐛
morcef
morcef

🐛
alejandro-yousef
alejandro-yousef

🤔

This project follows the all-contributors specification. Contributions of any kind welcome!

Metadata

Release files for autodoc_pydantic 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autodoc_pydantic 2.1.0
File Size Uploaded Provenance Actions
autodoc_pydantic-2.1.0.tar.gz 29.7 kB Without provenance Details for autodoc_pydantic-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for autodoc_pydantic 2.1.0
File Interpreter ABI Platform Actions
autodoc_pydantic-2.1.0-py3-none-any.whl Python 3 none any Details for autodoc_pydantic-2.1.0-py3-none-any.whl

Total release size: 61.2 kB

Release files / autodoc_pydantic-2.1.0.tar.gz

Download URL autodoc_pydantic-2.1.0.tar.gz
Size 29.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3cf1b973e2f5ff0fbbe9b951c11827b5e32d3409e238f7f5782359426ab8d360
BLAKE2b-256 checksum
How to use checksums
00f3047ceb5c0b8ac31345faadc3e6c686356a122da91e8d4385c789cfd3992f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.10.13 Linux/6.5.0-1016-azure

Release files / autodoc_pydantic-2.1.0-py3-none-any.whl

Download URL autodoc_pydantic-2.1.0-py3-none-any.whl
Size 31.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f1f82ee3667589dfa08b21697be8bbd80b15110e838cd765bb1bf3ce1b0ea8f
BLAKE2b-256 checksum
How to use checksums
3167e35f982629e98c52a729220038f8de7bc7bd1a58da172ab6b81acdee3c3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.10.13 Linux/6.5.0-1016-azure

Security for autodoc_pydantic 2.1.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page