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
  • ๐Ÿ“š sorts fields, validators and model config within models by type
  • ๐Ÿ€ Supports pydantic >= 1.5.0 and sphinx >= 3.4.0

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.

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:


Franz Wรถllert

๐Ÿšง ๐Ÿ“– โš ๏ธ ๐Ÿ–‹

TheBeardedBerserkr

๐Ÿค”

Jan Vlฤinskรฝ

๐Ÿ›ก๏ธ

antvig

๐Ÿ› ๐Ÿ““

Hugo O Rivera

๐Ÿค”

yura bondarenko

๐Ÿ› ๐Ÿ““

Trevor Howard

๐Ÿ› ๐Ÿ““

thomas-pedot

๐Ÿ› ๐Ÿ““

Mat Utter

๐Ÿ› ๐Ÿ““

David C Hall

๐Ÿค” ๐Ÿ““

Josh A. Mitchell

๐Ÿค” โš ๏ธ

Roderick Go

โš ๏ธ

Lily Wang

๐Ÿ“– ๐Ÿ–‹

j-carson

๐Ÿ› ๐Ÿ’ป โš ๏ธ

Jakob Lykke Andersen

๐Ÿ’ป

Juan Luis Cano Rodrรญguez

๐Ÿ–‹

Mikalai Chaly

๐Ÿ› โš ๏ธ

Stig Korsnes

๐Ÿ› ๐Ÿค”

Ilia Kurenkov

๐Ÿ›

Grzegorz Bokota

๐Ÿ›

jgunstone

๐Ÿ›

iwyrkore

๐Ÿ’ป

spacemanspiff2007

๐Ÿ› ๐Ÿค”

Luke Hsiao

๐Ÿ›

Daniel Walker

๐Ÿ›

Evgeniy Lupashin

๐Ÿ›

Jan-Hendrik Ewers

๐Ÿ›

Jonny Saunders

๐Ÿ›

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-1.7.2.tar.gz (26.0 kB view hashes)

Uploaded Source

Built Distribution

autodoc_pydantic-1.7.2-py3-none-any.whl (28.2 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