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.
Please 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.
Quick Example
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 users
Development & Contributing
For 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.
AI-Assisted Workflow
We apply an AI-assisted Spec-Driven workflow inspired by GitHub Spec-Kit. We provide convenient commands for contributions:
🐛 Bug Reports: Use /create-issue command in your IDE, or submit an issue manually
💻 Pull Requests: Use /create-pr command in your IDE, or submit a PR manually
NeuG
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:
For more information on using NeuG, please refer to the NeuG documentation.
News
Installation
Please note that
neugrequiresPythonversion 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.
Quick Example
Development & Contributing
For 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.
AI-Assisted Workflow
We apply an AI-assisted Spec-Driven workflow inspired by GitHub Spec-Kit. We provide convenient commands for contributions:
/create-issuecommand in your IDE, or submit an issue manually/create-prcommand in your IDE, or submit a PR manuallyFor more details, see the AI-Assisted Development Guide.
Acknowledgements
NeuG builds upon the excellent work of the open-source community. We would like to acknowledge:
License
NeuG is distributed under the Apache License 2.0.