Installation¶
Grafeo supports Python, Node.js/TypeScript, Go, C#, Dart, Rust and WebAssembly. Choose the installation method for the preferred language.
Python¶
Using uv (Recommended)¶
uv is a fast Python package installer:
Using pip (alternative)¶
Verify Installation¶
import grafeo
# Print version
print(grafeo.__version__)
# Create an in-memory test database
db = grafeo.GrafeoDB()
print("Grafeo installed successfully!")
# Or create a persistent database on disk
db = grafeo.GrafeoDB("/path/to/my_graph.db")
Platform Support¶
| Platform | Architecture | Support |
|---|---|---|
| Linux | x86_64 | Full |
| Linux | aarch64 | Full |
| macOS | x86_64 | Full |
| macOS | arm64 (M1/M2) | Full |
| Windows | x86_64 | Full |
Node.js / TypeScript¶
Verify Installation¶
const { GrafeoDB } = require('@grafeo-db/js');
const db = await GrafeoDB.create();
console.log('Grafeo installed successfully!');
await db.close();
Go¶
Verify Installation¶
package main
import (
"fmt"
grafeo "github.com/GrafeoDB/grafeo/crates/bindings/go"
)
func main() {
db, _ := grafeo.OpenInMemory()
defer db.Close()
fmt.Println("Grafeo installed successfully!")
}
WebAssembly¶
Verify Installation¶
import init, { Database } from '@grafeo-db/wasm';
await init();
const db = new Database();
console.log('Grafeo WASM installed successfully!');
C# / .NET¶
Verify Installation¶
Dart¶
Add to pubspec.yaml:
Verify Installation¶
import 'package:grafeo/grafeo.dart';
void main() {
final db = GrafeoDB.memory();
print('Grafeo installed successfully!');
db.close();
}
Rust¶
Using Cargo¶
Add Grafeo to the project:
Or add it manually to Cargo.toml:
Feature Flags¶
Grafeo uses persona-based feature profiles that describe use cases rather than deployment targets. Compose them freely to match your needs:
[dependencies]
# Default: GQL + AI + algorithms + parallel + the database file, without a write-ahead log
grafeo = "0.6"
# Add RDF/SPARQL support
grafeo = { version = "0.6", features = ["rdf"] }
# Graph analytics
grafeo = { version = "0.6", features = ["analytics"] }
# Full feature set
grafeo = { version = "0.6", default-features = false, features = ["enterprise"] }
# Minimal: GQL only
grafeo = { version = "0.6", default-features = false, features = ["gql"] }
# With ONNX embedding generation (opt-in, ~17MB)
grafeo = { version = "0.6", features = ["embed"] }
GrafeoDB::open(path) works with the default features, but they have no write-ahead log: commits reach the file when the database checkpoints (close(), dropping it, or wal_checkpoint()), and a process that crashes loses the commits since. For commits that survive a crash, add the wal feature (also in the storage group and the lpg profile):
Persona Profiles¶
| Profile | Contents | Use case |
|---|---|---|
lpg | GQL, Cypher, Gremlin, SQL/PGQ, storage (write-ahead log, spill, mmap) | Graph applications |
rdf | SPARQL, triple-store, ring-index | Knowledge graphs, linked data |
analytics | Algorithms, parallel | Graph analytics pipelines |
ai | Vector, text, hybrid search, CDC | RAG, semantic search |
edge | GQL, compact, regex-lite | WASM, resource-constrained |
enterprise | All features | Full-featured deployments |
Deprecated profiles
The old deployment-target profiles (embedded, browser, server, full) still work as aliases but are deprecated and scheduled for removal in 0.7.0. Migrate to persona profiles when convenient.
Convenience Groups¶
| Group | Contents | Description |
|---|---|---|
languages | gql, cypher, sparql, gremlin, graphql, sql-pgq | All query language parsers |
ai | vector-index, text-index, hybrid-search, cdc | AI/RAG search + change tracking |
storage | wal, spill, mmap, grafeo-file | Persistence backends |
algos | graph algorithms | SSSP, PageRank, centrality, community detection |
embed | ort, tokenizers | ONNX embedding generation (opt-in, ~17MB) |
Individual Language Flags¶
| Feature | Description |
|---|---|
gql | GQL (ISO/IEC 39075): default query language |
cypher | Cypher (openCypher 9.0) |
sparql | SPARQL (W3C 1.1) + RDF support |
gremlin | Gremlin (Apache TinkerPop) |
graphql | GraphQL |
sql-pgq | SQL/PGQ (SQL:2023 GRAPH_TABLE) |
Individual AI Flags¶
| Feature | Description |
|---|---|
vector-index | HNSW approximate nearest neighbor index |
text-index | BM25 inverted index for full-text search |
hybrid-search | Combined text + vector search with score fusion |
cdc | Change data capture (before/after property snapshots) |
Verify Installation¶
use grafeo::GrafeoDB;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let db = GrafeoDB::new_in_memory();
println!("Grafeo installed successfully!");
Ok(())
}
Grafeo Server (Docker)¶
For a standalone database server accessible via REST API, use grafeo-server:
Three image variants are available:
| Variant | Tag | Description |
|---|---|---|
| lite | grafeo-server:lite | GQL only, no UI, smallest footprint |
| standard | grafeo-server:latest | All languages + AI/search + web UI |
| full | grafeo-server:full | Everything + auth + TLS + ONNX embed |
# Lite: minimal, GQL only
docker run -p 7474:7474 grafeo/grafeo-server:lite
# Full: production with auth and TLS
docker run -p 7474:7474 grafeo/grafeo-server:full \
--auth-token my-secret --data-dir /data
Server at http://localhost:7474. Web UI (standard/full) at http://localhost:7474/studio/.
See the grafeo-server documentation for full API reference and configuration.
Building from Source¶
Clone the Repository¶
Build Rust Crates¶
Build Python Package¶
This build has the same features as the published wheel: maturin reads them from [tool.maturin] features in crates/bindings/python/pyproject.toml. A --features option replaces that list instead of adding to it, so maturin develop --features pyo3/extension-module builds only the default set, without Cypher, SPARQL, Gremlin, GraphQL and SQL/PGQ.
To test another project against an unreleased version, build a wheel the way the release does (from the repository root) and install it into that project's environment:
maturin build --release --out dist -m crates/bindings/python/Cargo.toml
uv pip install --python /path/to/project/.venv dist/grafeo-*.whl
Check what a build contains with grafeo.features() and grafeo.build_info():
import grafeo
print(grafeo.features()) # ['gql', 'cypher', 'sparql', ...]
print(grafeo.build_info()) # version, git commit, dirty, features, profile
Build Node.js Package¶
Build WASM Package¶
Next Steps¶
With Grafeo installed, continue to the Quick Start guide.