--- id: eralchemy version: "1.7.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # eralchemy — Simple entity relation (ER) diagrams generation License: permissive · Maintenance: active · Downloads: 3.9M/mo ## What it is and what it does eralchemy reads database schemas or SQLAlchemy ORM models and generates visual Entity Relation diagrams. It accepts input from live databases (via SQLAlchemy connection URLs), SQLAlchemy declarative bases, or markdown-format ER files, then outputs diagrams as PNG, PDF, SVG, or markdown. The tool includes a command-line interface for batch processing and a Python API for programmatic use, with options to filter tables and columns, select database schemas, and customize diagram rendering (crowfoot notation, primary key markers, layout direction). The package depends only on sqlalchemy at runtime; graphviz or pygraphviz must be installed separately to generate image output. It supports filtering by table name and column name, schema selection for multi-schema databases, and output format selection including mermaid diagram syntax. The modular architecture is designed to eventually support other ORMs beyond SQLAlchemy. Use it for: - Generate visual documentation of an existing PostgreSQL or SQLite database schema for team reference - Export a SQLAlchemy ORM model as a diagram to include in project documentation or design reviews - Create filtered ER diagrams excluding system or audit tables from a large production database - Convert markdown ER specifications into visual diagrams for stakeholder presentation - Batch-generate schema diagrams from multiple databases using the command-line interface ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates Entity Relation (ER) diagrams from SQLAlchemy models or existing databases, outputting to image, PDF, or markdown formats. Yes. Active maintenance, no known vulnerabilities, low install friction, and a single stable runtime dependency make this a safe choice. The Apache-2.0 license is permissive. Install it if you need to visualize database schemas or SQLAlchemy models; the GraphViz system dependency is the only real prerequisite. ## Install pip install eralchemy uv add eralchemy poetry add eralchemy ## Installing eralchemy Before you install: Low friction install with a single runtime dependency (sqlalchemy). Active maintenance with recent commits and stable production status. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions. Quickstart: pip install eralchemy pip install eralchemy[graphviz] from eralchemy import render_er render_er("sqlite:///path/to/db.db", 'erd_output.png') Requires GraphViz system library installed (apt install graphviz libgraphviz-dev on Debian, or available for Windows/Mac/Linux from graphviz.org). Python >=3.10 required. Verify before relying: - Whether pygraphviz extra works reliably on all platforms (graphviz extra is noted as default when both installed) - Performance characteristics with very large schemas or databases - Completeness of markdown-to-diagram round-trip fidelity ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 3.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags ER diagram generator, database schema visualization, SQLAlchemy diagram, entity relationship diagram, database visualization tool, schema to diagram, relational database diagram, schema-visualization, database-tools [View on SkillFed](https://skillfed.io/packages/eralchemy) · [View on PyPI](https://pypi.org/project/eralchemy/)