spacemanspiff2007 / autodoc_pydantic

Seamlessly integrate pydantic models in your Sphinx documentation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Autodoc Pydantic

PyPI version Python

Master Coverage

All Contributors Downloads

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

πŸ›

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

About

Seamlessly integrate pydantic models in your Sphinx documentation.

License:MIT License


Languages

Language:Python 100.0%Language:CSS 0.0%