Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyerd-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyerd-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

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

Hashes for pyerd-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ccae8b85a264647517abcea93fab9813773e3e9bc1c59b9b9a635feafd48a87f
MD5 f4b30bee4cb6b5d23ce157eabb5dbcfa
BLAKE2b-256 87d230f293c42b2f2ed92955cf8558bd61861a3c7978b65c3d24d5c2ff8192fc

See more details on using hashes here.

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

Hashes for pyerd-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b3460240eb71101a474c462987ca4ba319ea07adf3c2b99ca1b4a8bcc4a1ac17
MD5 b0cfc5a880b41e2930d89cb0abaacd34
BLAKE2b-256 ca42a1d7213b69a5d9b92d66d99be1eccbaef32d924fd7b7c6786c0bb66c2c83

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page