Your first query
Prerequisites
You only need the Python package — see Install.
pip install namidbOpen a namespace, write, read
Open a Python REPL (python -i, a Jupyter cell, or any .py script):
import namidb
# Open an in-memory namespace. No bucket, no credentials, no disk.# It lives for as long as this Python process is alive.client = namidb.Client("memory://demo")
# Write some data.client.cypher("CREATE (a:Person {name: 'Alice', age: 30})")client.cypher("CREATE (b:Person {name: 'Bob', age: 25})")client.cypher( "MATCH (a:Person {name: 'Alice'}), (b:Person {name: 'Bob'}) " "CREATE (a)-[:KNOWS {since: 2020}]->(b)")
# Read it back, with a parameter.result = client.cypher( "MATCH (p:Person) WHERE p.age >= $min RETURN p.name AS name, p.age AS age", params={"min": 18},)
print(result.rows())That’s it. You have a working graph database, query language, parser, optimizer, executor and storage layer running inside a single Python process — and you wrote three Cypher statements against it.
What just happened
memory://demo— opened an ephemeral graph namespace calleddemo. Nothing was written to disk or to a bucket. Closing the Python process loses everything.CREATE— wrote twoPersonnodes and oneKNOWSrelationship. The same engine that powers the Cloud cluster ran these writes through the parser, planner, executor, WAL, and memtable inside your process.MATCH … WHERE … RETURN— read it back. The parameter$minwas bound at execution time, the predicatep.age >= 18was pushed down, and the projection returned only thenameandagecolumns.
Make it durable
When you want the graph to outlive the Python process, only the URI changes — the Python code stays identical:
| Where it lives | URI |
|---|---|
| Local disk | file:///var/lib/namidb?ns=demo |
| MinIO (S3-compatible, local) | s3://my-bucket?ns=demo&endpoint=http://localhost:9000&allow_http=true |
| AWS S3 | s3://my-bucket?ns=demo®ion=us-east-1 |
| Cloudflare R2 | s3://my-bucket?ns=demo&endpoint=https://<id>.r2.cloudflarestorage.com®ion=auto |
| Google Cloud Storage | gs://my-bucket?ns=demo |
| Azure Blob | az://my-account/my-container?ns=demo |
Credentials come from the standard cloud env vars (AWS_ACCESS_KEY_ID,
GOOGLE_APPLICATION_CREDENTIALS, etc.). See Storage
backends for the per-backend reference.
What’s next
- Embedded (Python) — the full
Python surface (parameters, async with
acypher, Arrow / pandas / polars output). - Reading data — every read clause.
- Writing data —
CREATE,MERGE,SET,DELETE.