📖 Project Overview
CypherDB (formerly GoGraph) is a lightweight, zero-dependency, embedded graph database written entirely in Go. Think of it as "SQLite for Graph Databases".
It allows Go and Python developers to execute Cypher queries (the standard graph query language) and manage local graph data—nodes, relationships, and properties—without the overhead of external heavy database services like Neo4j.
⚡ Quick Start
1. Install Python Package
pip install cypherdb
Basic Example:
import cypherdb
# Create database
db = cypherdb.Database("my_graph.db")
# Use transaction with context manager
with db.transaction() as tx:
node_id = tx.create_node("Person", {"name": "Alice"})
print(f"Created node: {node_id}")
# Auto-commit
# Manual transaction
tx = db.transaction()
try:
tx.create_node("Person", {"name": "Bob"})
tx.commit()
except:
tx.rollback()
2. Install CLI (Go)
The fastest way to explore CypherDB is via the CLI.
macOS / Linux (Homebrew):
brew tap dotnetage/gograph
brew install gograph
Run TUI (Interactive Shell):
# Simply run without arguments to open default.db in interactive mode
gograph
✨ Key Features
- 🚀 Pure Go: No CGO, seamless cross-platform support.
- 🐍 Python Bindings: Easy integration with Python applications.
- 📦 Embedded: Zero-config, single-directory storage (Pebble DB).
- 🔍 Cypher Support: Native
MATCH,CREATE,SET,DELETE. - 🛡️ ACID: MVCC, thread-safety, and WAL recovery.
- 🛠️ TUI Included: Interactive shell with auto-completion and ASCII tables.
📝 CRUD Examples
Create
import cypherdb
db = cypherdb.Database("my_graph.db")
with db.transaction() as tx:
# Create nodes
alice = tx.create_node("Person", {"name": "Alice", "age": 30})
bob = tx.create_node("Person", {"name": "Bob"})
charlie = tx.create_node("Person", {"name": "Charlie"})
# Create relationship
tx.create_relationship(alice, bob, "KNOWS", {"since": 2020})
tx.create_relationship(bob, charlie, "KNOWS", {"since": 2021})
Read
with db.transaction() as tx:
# Find all Person nodes
persons = tx.query("MATCH (p:Person) RETURN p.name, p.age")
for person in persons:
print(f"Name: {person['p.name']}, Age: {person.get('p.age', 'N/A')}")
# Find relationships
friends = tx.query("""
MATCH (a:Person)-[r:KNOWS]->(b:Person)
RETURN a.name, b.name, r.since
""")
for f in friends:
print(f"{f['a.name']} knows {f['b.name']} since {f['r.since']}")
Update
with db.transaction() as tx:
# Update property
tx.exec("MATCH (p:Person {name: 'Alice'}) SET p.age = 31")
# Add label
tx.exec("MATCH (p:Person {name: 'Bob'}) SET p:Admin")
Delete
with db.transaction() as tx:
# Delete a node
tx.exec("MATCH (p:Person {name: 'Alice'}) DELETE p")
# Delete node and all its relationships
tx.exec("MATCH (p:Person {name: 'Bob'}) DETACH DELETE p")
# Delete relationships only
tx.exec("MATCH ()-[r:KNOWS]->() WHERE r.since < 2021 DELETE r")
💻 CLI Usage
The gograph binary provides a powerful TUI and command-line utilities.
| Command | Description |
|---|---|
gograph |
Launch Interactive TUI (default to default.db) |
gograph query <cypher> |
Run a read-only query |
gograph exec <cypher> |
Run a data modification command |
Example:
gograph query "MATCH (n) RETURN n"
🧩 System Compatibility
- OS: macOS, Linux, Windows.
- Arch:
amd64,arm64. - Python: 3.9+
📚 Documentation
Check out the full Documentation or the Docs Folder.
Metadata
Release files for cypherdb 0.3.0
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 |
|---|---|---|---|---|
| cypherdb-0.3.0.tar.gz | 6.9 kB | Without provenance | Details for cypherdb-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cypherdb-0.3.0-cp314-cp314-macosx_26_0_x86_64.whl | CPython 3.14 | CPython 3.14 | macOS 26.0+ x86-64 | Details for cypherdb-0.3.0-cp314-cp314-macosx_26_0_x86_64.whl |
Total release size: 4.7 MB
Release files / cypherdb-0.3.0.tar.gz
| Download URL | cypherdb-0.3.0.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e5a01988eeef5d1f87685a7a6e0fd80a2ae8e328c23c9b6aa9d0be2265a8d673
|
|
BLAKE2b-256 checksum How to use checksums |
79a99f39bfd3a3b680bcac52ee2511095acf9b91c8e77c2b215a54fb4b95ea23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / cypherdb-0.3.0-cp314-cp314-macosx_26_0_x86_64.whl
| Download URL | cypherdb-0.3.0-cp314-cp314-macosx_26_0_x86_64.whl |
|---|---|
| Size | 4.7 MB |
| Tags | CPython 3.14 macOS 26.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
7b211b492eb18554a2d1b4c1b19fa0c92d97546c852f83d411dc170a40f27004
|
|
BLAKE2b-256 checksum How to use checksums |
086e79438b76927d597c52bbb3b01b7960372a230be168a04a3fdc9114b2872c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for cypherdb 0.3.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.