Skip to main content

engramedb

PyPI Version License: MIT

EngramDB is a high-performance, real-time, code-native graph database engine written in Rust with native PyO3 Python bindings.

Designed for AI agentic tools, MCP servers, code search engines, and static analysis tools, EngramDB compiles AST nodes, function calls, class inheritance, and file dependencies into an in-memory Compressed Sparse Row (CSR) graph for microsecond-latency impact analysis and graph querying.


Key Features

  • ⚡ Ultra-Fast CSR Graph Traversal: Bidirectional Compressed Sparse Row (CSR) call-graph indexing for sub-millisecond call-tree tracing and blast radius calculation.
  • 🧵 Thread-Safe Architecture: Atomic concurrent reads (read()) and writes (write()) guarded by Rust's Arc<RwLock<InnerEngineState>>.
  • 🔍 Rich AST Metadata Indexing: Stores nodes (functions, classes, files, folders, routes) with full signatures, docstrings, decorators, inheritance, imports, line ranges, and custom JSON payloads.
  • 🛡️ Blast Radius & Impact Analysis: Instantly compute transitive caller/callee trees and impact scores for breaking change detection.
  • 💾 Zero-Copy Persistence: Instant binary snapshot serialization and disk persistence (rkyv / bincode).
  • 🐍 Pre-compiled Python Wheels: Available for Linux, macOS, and Windows across Python 3.10–3.13.

Installation

pip install engramedb

Quick Start

import engramdb

# 1. Initialize engine with workspace storage path
engine = engramdb.PyMetadataEngine("/path/to/workspace")

# 2. Index AST Nodes & Relationships
engine.add_node(
    "services.py:create_sale",
    "Function",
    "create_sale",
    "services.py",
    _extra={
        "signature": "def create_sale(user, item_id):",
        "docstring": "Creates a new sales transaction.",
        "decorators": ["transaction.atomic"],
        "lines_start": 10,
        "lines_end": 25,
    }
)

engine.add_node("inventory.py:deduct_stock", "Function", "deduct_stock", "inventory.py")
engine.add_edge("services.py:create_sale", "inventory.py:deduct_stock", "calls")

# 3. Build Compressed Sparse Row (CSR) Graph
engine.build()

# 4. Blast Radius & Call Graph Analysis
impact = engine.blast_radius("inventory.py:deduct_stock", depth=3)
print(f"Affected nodes: {impact}")

# 5. Fast Keyword & Property Search
results = engine.search("create_sale")

License

Distributed under the MIT License.

Metadata

Release files for engramedb 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for engramedb 1.0.1
File Size Uploaded Provenance Actions
engramedb-1.0.1.tar.gz 4.7 MB Without provenance Details for engramedb-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for engramedb 1.0.1
File Interpreter ABI Platform Actions
engramedb-1.0.1-cp310-cp310-manylinux_2_34_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.34+ x86-64 Details for engramedb-1.0.1-cp310-cp310-manylinux_2_34_x86_64.whl

Total release size: 5.1 MB

Release files / engramedb-1.0.1.tar.gz

Download URL engramedb-1.0.1.tar.gz
Size 4.7 MB
Tags Source
SHA-256 checksum
How to use checksums
728df0126cc859e6535fb76ce4261d5451636e140187e387807241dc02fb4ff1
BLAKE2b-256 checksum
How to use checksums
5d3c8b9d9b056fb702c2446c3ca098d52c4db241bff4e4f68622aaf257a437d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.1

Release files / engramedb-1.0.1-cp310-cp310-manylinux_2_34_x86_64.whl

Download URL engramedb-1.0.1-cp310-cp310-manylinux_2_34_x86_64.whl
Size 422.5 kB
Tags CPython 3.10 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
a56757a45dca8819fd9ac47a3e69ed9723f765cd2b597a5e0b2c156333810fba
BLAKE2b-256 checksum
How to use checksums
122c53198fb1b8b71451fa1148486a40f828f8090746cad96ff01fb9ec786a6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.1

Security for engramedb 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page