Skip to main content

Seamlessly integrate pydantic models in your Sphinx documentation.

Project description

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!

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

autodoc_pydantic-2.1.0.tar.gz (29.7 kB view hashes)

Uploaded Source

Built Distribution

autodoc_pydantic-2.1.0-py3-none-any.whl (31.5 kB view hashes)

Uploaded Python 3

Supported by

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