eralchemy
ERAlchemy is a Python tool that automatically generates Entity-Relation diagrams from databases or SQLAlchemy models. It supports multiple databases (SQLite, PostgreSQL, MySQL) and outputs to various formats including PNG, PDF, SVG, and markdown.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | eralchemy/eralchemy |
| Owner | eralchemy |
| Primary language | Python |
| License | Apache-2.0 — OSI-approved |
| Stars | 1.4k |
| Forks | 132 |
| Open issues | 11 |
| Latest release | v1.7.0 (2026-05-05) |
| Last updated | 2026-05-05 |
| Source | https://github.com/eralchemy/eralchemy |
What eralchemy is
ERAlchemy provides a modular pipeline that ingests database schemas or SQLAlchemy ORM definitions, transforms them into an intermediary representation, and renders to Graphviz or markdown. It requires GraphViz as an external dependency and supports optional pygraphviz or graphviz Python bindings for diagram generation.
Get the eralchemy source
Clone the repository and explore it locally.
git clone https://github.com/eralchemy/eralchemy.gitcd eralchemy# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- GraphViz must be installed as a system dependency (apt install graphviz libgraphviz-dev on Debian, or downloaded from graphviz.org); Python package alone is insufficient.
- Choose between graphviz and pygraphviz Python bindings at install time via pip extras; both have different platform compatibility profiles (pygraphviz can be brittle on some systems).
- For database introspection, use SQLAlchemy database URL format; credentials are passed at command-line or in code, so consider secret management for automated pipelines.
- PostgreSQL connection tests require local database setup or docker-compose; CI/CD integration should mark external_db tests as optional.
- Rendering configuration (crowfoot notation, primary key symbols, layout direction) is controlled via global config dictionary; document and version these settings if standardizing across teams.
When to avoid it — and what to weigh
- Real-time Interactive Editing Required — ERAlchemy is a one-way generator, not an interactive editor. If you need to modify diagrams and push changes back to schema, use a specialized database design tool.
- Complex Non-Relational Schemas — The tool is designed for SQL relational databases. If your data model is predominantly graph, document, or key-value based, ERAlchemy will not capture the full structure.
- Minimal Python Ecosystem Integration — Requires Python, pip/conda, and external GraphViz binary installation. If your environment has no Python footprint or restricted system package access, consider web-based alternatives.
- High-Volume Automated Schema Introspection at Scale — Performance and scalability characteristics for very large schemas (100+ tables) or frequent batch generation are not documented. Requires testing in your environment.
License & commercial use
Released under Apache License 2.0, an OSI-approved permissive license that permits commercial use, modification, and distribution with no patent retaliation clause.
Apache 2.0 is a permissive OSI license that allows commercial use without restriction. No commercial licensing, support contract, or usage fees are indicated. Use is permitted as-is; ensure compliance with Apache 2.0 attribution and liability disclaimers in production deployments.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Moderate |
| DEV.co fit | Good |
| Assessment confidence | High |
Database credentials are passed via SQLAlchemy URLs (command-line or code), exposing them in shell history or logs. For production databases, use environment variables or secret management tools (e.g., AWS Secrets Manager, HashiCorp Vault) and audit log retention. GraphViz is an external binary—verify its integrity and keep it patched. No security policy or disclosure process is mentioned in the repository.
Alternatives to consider
SchemaCrawler
Java-based tool with broader database support and interactive reports; more heavyweight and requires JVM but offers richer enterprise features and schema evolution tracking.
DBeaver ER Diagrams
GUI-based database client with built-in ER diagram generation; no coding required but less suitable for CI/CD automation and headless environments.
pgAdmin (PostgreSQL) / MySQL Workbench
Native database clients with diagram features; tight coupling to specific databases limits portability but offers deeper introspection and design tools.
Build on eralchemy with DEV.co software developers
Generate professional ER diagrams directly from your database or SQLAlchemy models. Integrate into CI/CD pipelines for living schema documentation. Get started with pip install eralchemy today.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
eralchemy FAQ
Can I use ERAlchemy in a CI/CD pipeline to auto-generate schema docs?
Does ERAlchemy support non-SQL databases (MongoDB, Neo4j, etc.)?
What is the difference between graphviz and pygraphviz extras?
Can I exclude sensitive tables or columns from the diagram?
Software development & web development with DEV.co
DEV.co helps companies turn open-source tools like eralchemy into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your open-source databases stack.
Automate Your Database Documentation
Generate professional ER diagrams directly from your database or SQLAlchemy models. Integrate into CI/CD pipelines for living schema documentation. Get started with pip install eralchemy today.