An open API service indexing awesome lists of open source software.

https://github.com/mansenfranzen/autodoc_pydantic

Seamlessly integrate pydantic models in your Sphinx documentation.
https://github.com/mansenfranzen/autodoc_pydantic

autodoc documentation pydantic python sphinx sphinx-extension

Last synced: 29 days ago
JSON representation

Seamlessly integrate pydantic models in your Sphinx documentation.

Awesome Lists containing this project

README

        

![Autodoc Pydantic](https://raw.githubusercontent.com/mansenfranzen/autodoc_pydantic/main/docs/source/material/logo_black.svg)

[![PyPI - Version](https://img.shields.io/pypi/v/autodoc_pydantic?style=for-the-badge&logo=python&logoColor=white)](https://pypi.org/project/autodoc_pydantic/)
[![Python](https://img.shields.io/badge/python-3.8+-blue.svg?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/autodoc_pydantic?style=for-the-badge&logo=python&logoColor=white&color=blue)](https://pypistats.org/packages/autodoc-pydantic)

[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/mansenfranzen/autodoc_pydantic/tests-push-pr.yml?style=for-the-badge&logo=github)](https://github.com/mansenfranzen/autodoc_pydantic/actions)
[![Codecov](https://img.shields.io/codecov/c/gh/mansenfranzen/autodoc_pydantic?style=for-the-badge&logo=codecov)](https://app.codecov.io/gh/mansenfranzen/autodoc_pydantic)
[![Read the Docs (stable)](https://img.shields.io/readthedocs/autodoc_pydantic/stable?style=for-the-badge&logo=sphinx&label=Docs%20stable)](https://autodoc-pydantic.readthedocs.io/en/stable/)

[![GitHub License](https://img.shields.io/github/license/mansenfranzen/autodoc_pydantic?style=for-the-badge&color=orange&logo=semanticscholar&logoColor=white)](https://github.com/mansenfranzen/autodoc_pydantic/blob/main/LICENSE)
[![linting - ruff](https://img.shields.io/badge/Linting-orange?style=for-the-badge&logo=ruff&logoColor=white&label=ruff)](https://github.com/astral-sh/ruff)
[![types - Mypy](https://img.shields.io/badge/types-Mypy-orange.svg?style=for-the-badge&logo=python&logoColor=white)](https://github.com/python/mypy)
[![All Contributors](https://img.shields.io/badge/all_contributors-57-orange.svg?style=for-the-badge)](https://github.com/mansenfranzen/autodoc_pydantic?tab=readme-ov-file#-acknowledgements)

You love [pydantic](https://pydantic-docs.helpmanual.io/) ❀ and you want to
document your models and configuration settings with [sphinx](https://www.sphinx-doc.org/en/master/)?

Perfect, let's go. But wait, sphinx' [autodoc](https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html)
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](https://autodoc-pydantic.readthedocs.io/en/stable/) | Guides and detailed information. |
| [πŸ› οΈ Installation](https://autodoc-pydantic.readthedocs.io/en/stable/users/installation.html) | Setup and installation procedures. |
| [πŸ”§ Configuration](https://autodoc-pydantic.readthedocs.io/en/stable/users/configuration.html) | System or application settings. |
| [πŸ’‘ Usage](https://autodoc-pydantic.readthedocs.io/en/stable/users/usage.html) | How to use the application or tool. |
| [🌐 Examples](https://autodoc-pydantic.readthedocs.io/en/stable/users/examples.html) | Showcase and usage examples. |
| [πŸ‘¨β€πŸ’» Developer Guide](https://autodoc-pydantic.readthedocs.io/en/stable/developers/setup.html) | In-depth guide for developers. |

# πŸ™ Acknowledgements

Thanks to great open source projects [sphinx](https://www.sphinx-doc.org/en/master/),
[pydantic](https://pydantic-docs.helpmanual.io/) and
[poetry](https://python-poetry.org/) (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

πŸ› πŸ’¬
Mitchell Blyth
Mitchell Blyth

πŸ’¬


John-Luke Navarro
John-Luke Navarro

πŸ’¬

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!