Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 975 Bytes

README.md

File metadata and controls

30 lines (20 loc) · 975 Bytes

PyPI - License PyPI - Downloads

Why

django2pydantic is the most complete Pydantic schemas based on Django models.

What

django2pydantic is a library that allows to define Pydantic schemas based on Django database models.

Similar libraries:

Key features

  • Supports all Django model field types
  • Supports @property decorated Django model methods
  • Supports all Django model relation fields:
    • ForeignKey, OneToOneField, ManyToManyField
    • The reverse relations of the above (ManyToOneRel, OneToOneRel, ManyToManyRel)
  • Supports defining nested relations
  • Provides as complete OpenAPI schema details as possible

How to use

See usage example here.