No project description provided
Project description
Pyerd
Pyre - d
Generate ERDs from Pydantic models
Supports Mermaid
Installation
pip install pyerd
Usage
Create a python module that imports all the models you want to generate a diagram for.
Ex. models.py
from models.common import *
from models.donuts import *
from models.plants import *
Import the module and call draw()
from pyerd import draw
# multiple models
from package import models
draw(models, "output.md")
Generate Image
For mermaid images you can use the mermaid cli to turn the output of pyerd into an image
npm install -g @mermaid-js/mermaid-cli
mmdc -i output.md -o output.png -t dark -b transparent
Development
ruff check pyerd
pyright pyerd
Tests
poetry run pytest --cov=pyerd tests/
Future Features
Generate from single class
Generate from dataclass class
Generate from SQLModel class
Generate PlantUML diagram for supported classes
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyerd-0.1.0.tar.gz.
File metadata
- Download URL: pyerd-0.1.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.6 Darwin/22.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccae8b85a264647517abcea93fab9813773e3e9bc1c59b9b9a635feafd48a87f
|
|
| MD5 |
f4b30bee4cb6b5d23ce157eabb5dbcfa
|
|
| BLAKE2b-256 |
87d230f293c42b2f2ed92955cf8558bd61861a3c7978b65c3d24d5c2ff8192fc
|
File details
Details for the file pyerd-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyerd-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.6 Darwin/22.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3460240eb71101a474c462987ca4ba319ea07adf3c2b99ca1b4a8bcc4a1ac17
|
|
| MD5 |
b0cfc5a880b41e2930d89cb0abaacd34
|
|
| BLAKE2b-256 |
ca42a1d7213b69a5d9b92d66d99be1eccbaef32d924fd7b7c6786c0bb66c2c83
|