engramedb
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 dual CSR (execution vs full-dependency) for sub-millisecond
blast_radius/recursive_callees. - 🧵 Thread-Safe Architecture:
Arc<RwLock<InnerEngineState>>withread()/write()andsnapshot_loadedwarm-start guard. - 🔍 Rich AST Metadata Indexing: Functions/classes/files/folders/routes with signatures, decorators,
inherits,imports, line ranges +extra_json(python_import_bindings,python_receiver_types,python_shadowed_namesfor Python contextual callsv3). - 🛡️ Blast Radius & Impact Analysis:
get_callers/get_callees= execution only;get_dependencies/get_dependents= full structural + execution. - 💾 Zero-Copy Persistence: Binary snapshot
v3(EGRM+ typedresolved_call_edges/execution_edges/generated_execution_edges/structural_edges). - 🐍 Pre-compiled Python Wheels: Linux/macOS/Windows, CPython 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 (calls + extra metadata)
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")
# 3. Wire edges — execution vs structural are typed (v3 snapshot)
engine.add_edge("services.py:create_sale", "inventory.py:deduct_stock") # 2 args: execution/call edge
engine.add_structural_edge("services.py:create_sale", "services.py") # containment / import / ORM
# 4. Build CSR (dual graphs: execution + full dependencies)
engine.build()
# 5. Typed traversal
print(engine.get_callees("services.py:create_sale")) # execution only
print(engine.get_dependencies("services.py:create_sale")) # execution + structural
print(engine.blast_radius("inventory.py:deduct_stock", 3))
print(engine.search("create_sale"))
License
Distributed under the MIT License.
Metadata
Release files for engramedb 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| engramedb-1.1.1.tar.gz | 5.2 MB | Without provenance | Details for engramedb-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| engramedb-1.1.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.1.1-cp310-cp310-manylinux_2_34_x86_64.whl |
Total release size: 5.7 MB
Release files / engramedb-1.1.1.tar.gz
| Download URL | engramedb-1.1.1.tar.gz |
|---|---|
| Size | 5.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
965dc97f883aac9d7a16261c3e77272a5b9c85f45d48674002d7490499403f08
|
|
BLAKE2b-256 checksum How to use checksums |
91b70d21db330763bc4b6234b582e05825b3c7172b26e35a6fb9385140f47df5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.13.1
|
Release files / engramedb-1.1.1-cp310-cp310-manylinux_2_34_x86_64.whl
| Download URL | engramedb-1.1.1-cp310-cp310-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 469.4 kB |
| Tags | CPython 3.10 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
2406fcb63a46ddd988a85138389b7aa509acaca448b8a82df27ec77607f1b9c5
|
|
BLAKE2b-256 checksum How to use checksums |
8e2a487b8de6a2b40cc9ddd5ccdb82ef9f25948db5b84742976b03d2285b7516
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/1.13.1
|
Security for engramedb 1.1.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.