npm.io
0.1.3 • Published 3d ago

@graphscope-neug/linux-x86_64

Licence
Apache-2.0
Version
0.1.3
Deps
1
Size
68.0 MB
Vulns
0
Weekly
0
Stars
118

NeuG
A Graph Database for HTAP Workloads

NeuG Test (Linux) NeuG Wheel Packaging NeuG Documentation Coverage Discord Twitter


NeuG (pronounced "new-gee") is a graph database for HTAP (Hybrid Transactional/Analytical Processing) workloads. It 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, please refer to the NeuG documentation.

News

Installation

The packages work on Linux, macOS, and Windows (via WSL2). For more detailed instructions (including C++ from source), see the installation guide.

Python  ·  requires Python 3.8+
pip install neug
Node.js  ·  requires Node.js 18+  (since v0.1.3)
npm install @graphscope-neug/neug

Quick Example

Python
import neug

db = neug.Database("/path/to/database")
db.load_builtin_dataset("tinysnb")

conn = db.connect()

# 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
""")

for record in result:
    print(f"{record[0]}, {record[1]}, {record[2]} are mutual friends")

# Switch to service mode
conn.close()
db.serve(port=8080)
Node.js
const { Database } = require('@graphscope-neug/neug');

const db = new Database({ databasePath: '', mode: 'w' });
const conn = db.connect();

conn.execute("CREATE NODE TABLE person(id INT64, fName STRING, PRIMARY KEY(id));");
conn.execute("CREATE REL TABLE knows(FROM person TO person);");
conn.execute("CREATE (:person {id: 1, fName: 'Alice'}), (:person {id: 2, fName: 'Bob'}), (:person {id: 3, fName: 'Carol'});");
conn.execute("MATCH (a:person {id: 1}), (b:person {id: 2}), (c:person {id: 3}) CREATE (a)-[:knows]->(b), (b)-[:knows]->(c), (a)-[:knows]->(c);");

// Find triangles in the graph
const result = conn.execute(`
    MATCH (a:person)-[:knows]->(b:person)-[:knows]->(c:person),
          (a)-[:knows]->(c)
    RETURN a.fName, b.fName, c.fName
`);

for (const record of result) {
    console.log(`${record[0]}, ${record[1]}, ${record[2]} are mutual friends`);
}

conn.close();
db.close();

Development & Contributing

For building NeuG from source, see the Development Guide. We welcome contributions — please read the Contributing Guide before submitting issues or pull requests.

AI-Assisted Workflow

We apply an AI-assisted Spec-Driven workflow inspired by GitHub Spec-Kit:

  • 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

For 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:

  • 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

License

NeuG is distributed under the Apache License 2.0.