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.1.0

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.1.0
File Size Uploaded Provenance Actions
engramedb-1.1.0.tar.gz 5.2 MB Without provenance Details for engramedb-1.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 5.7 MB

Release files / engramedb-1.1.0.tar.gz

Download URL engramedb-1.1.0.tar.gz
Size 5.2 MB
Tags Source
SHA-256 checksum
How to use checksums
ac4c45712582fadcfea1138e970cf72c73b90fba766ae3db3cf8e67c0f172803
BLAKE2b-256 checksum
How to use checksums
3345f50e9373297a0395be6358edfe015543b864d1c2646850dbd6da218298bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.13.1

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

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

Security for engramedb 1.1.0

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