rustic-ai/uni-db
rustic-ai/uni-db has 58 GitHub stars and 6 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-08 13:59 UTC. Last push 2026-10-28.
Uni is a modern, embedded database that combines property graph (OpenCypher), vector search, and columnar storage (Lance) into a single, cohesive engine. It is designed for applications requiring local, fast, and multimodal data access, backed by object storage (S3/GCS) durability.
What you can do
- Embedded & Serverless: Runs as a library within your application — no server process.
- Property Graph: OpenCypher queries with MATCH, CREATE, WHERE, ORDER BY, LIMIT, and aggregations.
- Serializable Transactions: Snapshot isolation + optimistic concurrency control, on by default — conflicting concurrent commits abort with a retriable error instead of silently losing writes.
- Locy Reasoning: Datalog-style recursive rules over the graph, with probabilistic semantics and neural predicates.
Measured star growth
- in 24h
- 0
- in 7 days
- Update delayed
- in 15 days
- Update delayed
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalUni: Embedded Graph & Vector Database
Uni is an embedded database that combines a property graph (OpenCypher), vector search, and columnar storage (Lance) into a single engine. Designed for applications requiring local, fast, multimodal data access with object storage (S3/GCS/local) durability.
Part of The Rustic Initiative by Dragonscale Industries Inc.
Key Features
- Embedded & Serverless: Runs as a library within your application — no server process.
- Property Graph: OpenCypher queries with MATCH, CREATE, WHERE, ORDER BY, LIMIT, and aggregations.
- Serializable Transactions: Snapshot isolation + optimistic concurrency control, on by default — conflicting concurrent commits abort with a retriable error instead of silently losing writes.
- Locy Reasoning: Datalog-style recursive rules over the graph, with probabilistic semantics and neural predicates.
- Vector Search: K-NN similarity search (L2, cosine) with pre-filter and threshold support, plus hybrid vector + BM25 fusion.
- Columnar Storage: Lance-backed persistence on local disk or object storage (S3/GCS).
- Graph Algorithms: PageRank, Louvain, shortest path, and more via the built-in algorithm library.
- Forks: Named, durable, writable graph branches with nesting, TTL, structural diff, and content-UID-keyed write-audit-publish promotion to primary. See
website/docs/features/forks.md. - Rust & Python: Native Rust crate and Python bindings (PyO3).
Getting Started
Rust
Add to your Cargo.toml:
[dependencies]
uni-db = "3"
use uni_db::{DataType, Uni};
let db = Uni::open("./my_graph").build().await?;
// Define schema
db.schema()
.label("Person")
.property("name", DataType::String)
.property("age", DataType::Int)
.done()
.apply()
.await?;
// Write data in a transaction
let session = db.session();
let tx = session.tx().await?;
tx.execute("CREATE (:Person {name: 'Alice', age: 30})").await?;
tx.execute("CREATE (:Person {name: 'Bob', age: 25})").await?;
tx.commit().await?;
// Query through the session
let results = session
.query_with("MATCH (p:Person) WHERE p.age > $min RETURN p.name AS name")
.param("min", 28)
.fetch_all()
.await?;
Python
pip install uni-db
import uni_db
# Open or create a database
db = uni_db.Uni.open("./my_graph")
# Define schema
(
db.schema()
.label("Person")
.property("name", "string")
.property("age", "int")
.index("name", "btree")
.done()
.apply()
)
# Write data in a transaction
session = db.session()
tx = session.tx()
tx.execute("CREATE (:Person {name: 'Alice', age: 30})")
tx.execute("CREATE (:Person {name: 'Bob', age: 25})")
tx.commit()
# Query through the session
results = session.query_with(
"MATCH (p:Person) WHERE p.age > $min RETURN p.name AS name"
).param("min", 28).fetch_all()
for row in results:
print(row["name"]) # Alice
Vector Search
# Create schema with an indexed vector property
(
db.schema()
.label("Document")
.property("text", "string")
.vector("embedding", 128)
.index("embedding", {"type": "vector", "metric": "cosine"})
.done()
.apply()
)
# Insert data
tx = session.tx()
tx.execute_with(
"CREATE (:Document {text: $text, embedding: $vec})"
).param("text", "hello world").param("vec", my_embedding).run()
tx.commit()
# K-NN search via Cypher procedure
results = session.query_with("""
CALL uni.vector.query('Document', 'embedding', $vec, 10)
YIELD node, distance
RETURN node.text AS text, distance
ORDER BY distance
""").param("vec", query_embedding).fetch_all()
Async API
The async API mirrors the sync one (AsyncUni, sessions, transactions):
import uni_db
async with uni_db.AsyncUni.open("./my_graph") as db:
session = db.session()
tx = await session.tx()
await tx.execute("CREATE (:Person {name: 'Alice', age: 30})")
await tx.commit()
results = await session.query("MATCH (p:Person) RETURN p.name AS name")
Python OGM (uni-pydantic)
pip install uni-pydantic
from uni_pydantic import UniNode, UniSession, Field, Relationship, Vector
class Person(UniNode):
name: str
age: int | None = None
email: str = Field(unique=True, index="btree")
embedding: Vector[128] = Field(metric="cosine")
friends: list["Person"] = Relationship("FRIEND_OF", direction="both")
session = UniSession(db)
session.register(Person)
session.sync_schema()
alice = Person(name="Alice", email="[email protected]")
session.add(alice)
session.commit()
adults = session.query(Person).filter(Person.age >= 18).order_by(Person.name).all()
Documentation
License
Apache 2.0 — see LICENSE for details.
Uni is developed by Dragonscale Industries Inc. as part of The Rustic Initiative.
Explore related projects
Asabeneh/30-Days-Of-Python
The 30 Days of Python programming challenge is a step-by-step guide to learn the Python programming language in 30 days. This challenge may take more than 100 days. Follow your own pace. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,423 starsgrafana/grafana
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
77,763 starsredis/redis
For developers, who are building real-time data-driven applications, Redis is the preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine.
77,309 starsapache/superset
Apache Superset is a Data Visualization and Data Exploration Platform
75,453 stars