Skip to main content

Seamlessly integrate pydantic models in your Sphinx documentation.

Project description

Autodoc Pydantic

PyPI - Version Python PyPI - Downloads

GitHub Actions Workflow Status Codecov Read the Docs (stable)

GitHub License linting - ruff types - Mypy 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

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:

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

๐Ÿค”
exs-dwoodward
exs-dwoodward

๐Ÿ’ป
Leah Wasser
Leah Wasser

๐Ÿ›
Allan Galarza
Allan Galarza

๐Ÿ›
Carson-Shaar
Carson-Shaar

๐Ÿ›
Kyle Finley
Kyle Finley

๐Ÿ›
brunocruz
brunocruz

๐Ÿ›
Anne Rademacher
Anne Rademacher

๐Ÿ’ต
ร‰loi Rivard
ร‰loi Rivard

๐Ÿ›

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

autodoc_pydantic-2.2.0-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

Details for the file autodoc_pydantic-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: autodoc_pydantic-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 34.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.14 Linux/6.5.0-1018-azure

File hashes

Hashes for autodoc_pydantic-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c6a36fbf6ed2700ea9c6d21ea76ad541b621fbdf16b5a80ee04673548af4d95
MD5 a5dd42db762f47fb6c988a454b47ea2d
BLAKE2b-256 7bdf87120e2195f08d760bc5cf8a31cfa2381a6887517aa89453b23f1ae3354f

See more details on using hashes here.

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