All Projects → drivendataorg → erdantic

drivendataorg / erdantic

Licence: MIT License
Entity relationship diagrams for Python data model classes like Pydantic

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to erdantic

pydantic-factories
Simple and powerful mock data generation using pydantic or dataclasses
Stars: ✭ 380 (+503.17%)
Mutual labels:  dataclasses, pydantic
climatecontrol
Python library for loading settings and config data from files and environment variables
Stars: ✭ 20 (-68.25%)
Mutual labels:  dataclasses, pydantic
ormsgpack
Msgpack serialization/deserialization library for Python, written in Rust using PyO3 and rust-msgpack. Reboot of orjson. msgpack.org[Python]
Stars: ✭ 88 (+39.68%)
Mutual labels:  dataclasses, pydantic
json2python-models
Generate Python model classes (pydantic, attrs, dataclasses) based on JSON datasets with typing module support
Stars: ✭ 119 (+88.89%)
Mutual labels:  dataclasses, pydantic
pydantic-i18n
pydantic-i18n is an extension to support an i18n for the pydantic error messages.
Stars: ✭ 32 (-49.21%)
Mutual labels:  pydantic
plant erd
ERD exporter with PlantUML and mermaid format
Stars: ✭ 126 (+100%)
Mutual labels:  erd
prisma-client-py
Prisma Client Python is an auto-generated and fully type-safe database client designed for ease of use
Stars: ✭ 739 (+1073.02%)
Mutual labels:  pydantic
pypackage
Cookiecutter python package using Poetry, mypy, black, isort, autoflake, pytest, mkdocs, and GitHub Actions
Stars: ✭ 12 (-80.95%)
Mutual labels:  pydantic
reactant
Generate code for "models, views, and urls" based on Python type annotations. Supports Django REST, SQLAlchemy, Peewee.
Stars: ✭ 14 (-77.78%)
Mutual labels:  pydantic
dataconf
Simple dataclasses configuration management for Python with hocon/json/yaml/properties/env-vars/dict support.
Stars: ✭ 40 (-36.51%)
Mutual labels:  dataclasses
djantic
Pydantic model support for Django
Stars: ✭ 256 (+306.35%)
Mutual labels:  pydantic
dataclassy
A complete and extended reimplementation of dataclasses, backwards compatible to Python 3.6
Stars: ✭ 58 (-7.94%)
Mutual labels:  dataclasses
fastapi-lazy
Lazy package to start your project using FastAPI✨
Stars: ✭ 84 (+33.33%)
Mutual labels:  pydantic
notion-sdk-py
Official Notion SDK rewritten in Python (sync + async)
Stars: ✭ 753 (+1095.24%)
Mutual labels:  dataclasses
ODetaM
A simple ODM(Object Document Mapper) for Deta Base based on pydantic
Stars: ✭ 18 (-71.43%)
Mutual labels:  pydantic
algorithm-bootcamp-sql
Teaching materials for Algorithm Bootcamp: Database Systems.
Stars: ✭ 18 (-71.43%)
Mutual labels:  erd
pydbantic
A single model for shaping, creating, accessing, storing data within a Database
Stars: ✭ 137 (+117.46%)
Mutual labels:  pydantic
spectree
API spec validator and OpenAPI document generator for Python web frameworks.
Stars: ✭ 190 (+201.59%)
Mutual labels:  pydantic
smokeshow
create temporary websites
Stars: ✭ 24 (-61.9%)
Mutual labels:  pydantic
flask-pydantic
flask extension for integration with the awesome pydantic package
Stars: ✭ 181 (+187.3%)
Mutual labels:  pydantic

erdantic: Entity Relationship Diagrams

Docs Status PyPI conda-forge tests codecov

erdantic is a simple tool for drawing entity relationship diagrams (ERDs) for Python data model classes. Diagrams are rendered using the venerable Graphviz library. Supported data modeling frameworks are:

Features include a convenient CLI, automatic native rendering in Jupyter notebooks, and easy extensibility to other data modeling frameworks. Docstrings are even accessible as tooltips for SVG outputs. Great for adding a simple and clean data model reference to your documentation.

Example diagram created by erdantic

Installation

erdantic's graph modeling depends on pygraphviz and Graphviz, an open-source C library. If you are on Linux or macOS, the easiest way to install everything together is to use conda and conda-forge:

conda install erdantic -c conda-forge

If not using conda, Graphviz must be installed first (before you can install pygraphviz). For recommended options and installation troubleshooting, see the pygraphviz docs. Then to install erdantic and its Python dependencies from PyPI:

pip install erdantic

Development version

You can get the development version from GitHub with:

pip install https://github.com/drivendataorg/erdantic.git#egg=erdantic

Quick Usage

The fastest way to produce a diagram like the above example is to use the erdantic CLI. Simply specify the full dotted path to your data model class and an output path. The rendered format is interpreted from the filename extension.

erdantic erdantic.examples.pydantic.Party -o diagram.png

You can also import the erdantic Python library and use its functions.

import erdantic as erd
from erdantic.examples.pydantic import Party

# Easy one-liner
erd.draw(Party, out="diagram.png")

# Or create a diagram object that you can inspect and do stuff with
diagram = erd.create(Party)
diagram.models
#> [PydanticModel(Adventurer), PydanticModel(Party), PydanticModel(Quest), PydanticModel(QuestGiver)]
diagram.draw("diagram.png")

Check out the "Usage Examples" section of our docs to see more.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].