freshcrate
Home > Databases > uni-db

uni-db

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 loca

Description

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.

README

Uni: Embedded Graph & Vector Database

License Rust Python

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.
  • Vector Search: K-NN similarity search (L2, cosine) with pre-filter and threshold support.
  • 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.
  • Rust & Python: Native Rust crate and Python bindings (PyO3).

Getting Started

Rust

Add to your Cargo.toml:

[dependencies]
uni-db = "0.1.3"

Python

pip install uni-db
import uni_db

# Open or create a database
db = uni_db.Database("./my_graph")

# Define schema
db.create_label("Person")
db.add_property("Person", "name", "string", False)
db.add_property("Person", "age", "int64", True)
db.create_scalar_index("Person", "name", "btree")

# Write data
db.execute("CREATE (p:Person {name: 'Alice', age: 30})")
db.execute("CREATE (p:Person {name: 'Bob', age: 25})")
db.flush()

# Query
results = db.query(
    "MATCH (p:Person) WHERE p.age > $min RETURN p.name",
    {"min": 28},
)
print(results)  # [{'p.name': 'Alice'}]

Vector Search

# Create schema with a vector property
db.create_label("Document")
db.add_property("Document", "text", "string", False)
db.add_property("Document", "embedding", "vector[128]", True)
db.create_vector_index("Document", "embedding", "cosine")

# Insert data
db.execute("CREATE (d:Document {text: 'hello world', embedding: [0.1, 0.2, 0.3]})")
db.flush()

# K-NN search
results = db.query("""
    CALL uni.vector.query('Document', 'embedding', $vec, 10)
    YIELD vid, distance
    RETURN vid, distance
    ORDER BY distance
""", {"vec": my_embedding})

# K-NN with pre-filter
results = db.query("""
    CALL uni.vector.query('Document', 'embedding', $vec, 10, 'category = "tech"')
    YIELD vid, distance
    RETURN vid, distance
""", {"vec": my_embedding})

Async API

import uni_db

db = await uni_db.AsyncDatabase.open("./my_graph")

await db.execute("CREATE (p:Person {name: 'Alice', age: 30})")
results = await db.query("MATCH (p:Person) RETURN p.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="alice@example.com")
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.

Release History

VersionChangesUrgencyDate
v1.1.0<!-- Release notes generated using configuration in .github/release.yml at main --> ## What's Changed ### Other Changes * Integrate BTIC support in query engine, Python bindings, and tests by @milliondreams in https://github.com/rustic-ai/uni-db/pull/38 **Full Changelog**: https://github.com/rustic-ai/uni-db/compare/v1.0.2...v1.1.0 <!-- Release notes generated using configuration in .github/release.yml at v1.1.0 --> ## What's Changed ### Other Changes * Integrate BTIC support in querHigh4/15/2026
v1.0.2<!-- Release notes generated using configuration in .github/release.yml at main --> ## What's Changed ### Other Changes * Fix publish order for uni-btic and update crate versions to 1.0.2 by @milliondreams in https://github.com/rustic-ai/uni-db/pull/29 * Bump crate versions and fix compaction debug assertion issue by @milliondreams in https://github.com/rustic-ai/uni-db/pull/30 **Full Changelog**: https://github.com/rustic-ai/uni-db/compare/v1.0.1...v1.0.2High4/11/2026
v1.0.0# Uni 1.0 Uni was a graph database with vector search. As of 1.0, it's a reasoning engine. Write rules. Attach probabilities to your edges. Uni propagates them through the graph — recursively, correctly — and gives you not just answers but *confidence scores* backed by full evidence chains. Graph structure, vector similarity, logical inference, probabilistic reasoning. One embedded library. No server. `pip install uni-db`. --- ## Probabilistic Locy Locy already let you define rHigh4/5/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

RaphtoryScalable graph analytics database powered by a multithreaded, vectorized temporal engine, written in Rustv0.17.0
coordinodeThe graph-native hybrid retrieval engine for AI and GraphRAG. Graph + Vector + Full-Text in a single transactional engine.v0.4.1
helix-dbHelixDB is an open-source graph-vector database built from scratch in Rust.v2.3.4
HelixTransform Claude into a local AI assistant for Mac that controls apps, manages tasks, and remembers context across sessions.main@2026-04-21
verisimiserAugment any database with VeriSimDB octad capabilities — drift detection, provenance, temporal versioning, modality overlaysmain@2026-04-18