Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sphinx-pydantic: sphinx extension for pydantic schemas #773

Zsailer opened this issue Aug 21, 2019 · 2 comments

sphinx-pydantic: sphinx extension for pydantic schemas #773

Zsailer opened this issue Aug 21, 2019 · 2 comments


Copy link

@Zsailer Zsailer commented Aug 21, 2019

I thought others might find this useful, so posting here. Feel free to close anytime.

We've been exploring pydantic for some subprojects we've been working on @jupyter. In that exploration, I wrote sphinx-pydantic—a sphinx extension for generating schema documentation from pydantic objects.

This makes it easy to generate human-readable documentation for schemas producted by pydantic objects. We're using pydantic and this extension to write+validate JSON schemas and auto-generate user documentation for those schemas.

See a simple example here.

repo | documentation

Copy link

@samuelcolvin samuelcolvin commented Aug 21, 2019

Awesome, great to hear you're using pydantic.

Would you consider adding sphinx-pydantic and perhaps any notable subprojects to the Using Pydantic section of the docs?

I'll leave this open for a week or two to increase the chance others seeing it.

Copy link

@mansenfranzen mansenfranzen commented Apr 27, 2021

Since this might be related, I created a sphinx autodoc extension called autodoc_pydantic that seamlessly integrates with sphinx autodoc to document pydantic models/settings.

It is different from sphinx-pydantic because it renders the generated documentation in standard layout rather than putting the schema into a table. Additionally, it provides default values, alias and constraints for model fields, adds references between validators and corresponding fields and more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants