Skip to main content

Seamlessly integrate pydantic models in your Sphinx documentation.

Project description

Autodoc Pydantic

PyPI version Master Python Codacy Badge Codacy Badge Documentation Status

You love pydantic :heart: 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 :confused:.

Don't worry - just pip install autodoc_pydantic :relaxed:.

Features

  • :speech_balloon: provides default values, alias and constraints for model fields
  • :link: adds references between validators and corresponding fields
  • :page_with_curl: includes collapsable model json schema
  • :surfer: natively integrates with autodoc extension
  • :paperclip: defines explicit pydantic prefixes for models, settings, fields, validators and model config
  • :clipboard: shows summary section for model configuration and validators
  • :eyes: hides overloaded and redundant model class signature
  • :books: 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) :heart: !

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

Uploaded Source

Built Distribution

autodoc_pydantic-1.2.0-py3-none-any.whl (15.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