NeuG (pronounced "new-gee") is a graph database for HTAP (Hybrid Transactional/Analytical Processing) workloads. NeuG provides two modes that you can switch between based on your needs:
- Embedded Mode: Optimized for analytical workloads including bulk data loading, complex pattern matching, and graph analytics
- Service Mode: Optimized for transactional workloads for real-time applications and concurrent user access
For more information on using NeuG, please refer to the NeuG documentation.
- 2026-03: We officially release NeuG v0.1
- 2025-06: We shatter LDBC SNB Interactive Benchmark world record with 80,000+ QPS for declarative queries
pip install neugPlease note that neug requires Python version 3.8 or above. The package works on Linux, macOS, and Windows (via WSL2).
For more detailed installation instructions, please refer to the installation guide.
import neug
# Step 1: Load and analyze data (Embedded Mode)
db = neug.Database("/path/to/database")
# Load sample data (must load data before creating connection)
db.load_builtin_dataset("tinysnb")
# Create connection to execute queries
conn = db.connect()
# Run analytics - find triangles in the graph
result = conn.execute("""
MATCH (a:person)-[:knows]->(b:person)-[:knows]->(c:person),
(a)-[:knows]->(c)
RETURN a.fName, b.fName, c.fName
""")
# Access results by index (QueryResult returns a list for each row)
for record in result:
print(f"{record[0]}, {record[1]}, {record[2]} are mutual friends")
# Step 2: Serve applications (Service Mode)
conn.close()
db.serve(port=8080)
# Now your application can handle concurrent usersFor building NeuG from source and development instructions, see the Development Guide.
We welcome contributions! Please read our Contributing Guide before submitting issues or pull requests.
We apply an AI-assisted Spec-Driven workflow inspired by GitHub Spec-Kit. We provide convenient commands for contributions:
- 🐛 Bug Reports: Use
/create-issuecommand in your IDE, or submit an issue manually - 💻 Pull Requests: Use
/create-prcommand in your IDE, or submit a PR manually
For more details, see the AI-Assisted Development Guide.
NeuG builds upon the excellent work of the open-source community. We would like to acknowledge:
- Kùzu: Our C++ Cypher compiler is adapted from Kùzu's implementation
- DuckDB: Our runtime value system and extension framework are inspired by DuckDB's architecture
NeuG is distributed under the Apache License 2.0.