Skip to content

Graph analytics
for your data lake.

A Python library that brings graph analytics to your data lake. Project data from S3, Databricks, Snowflake, and more into Neptune Analytics — then export results back.

Graph Over Data Lake

Project data from S3 Tables, S3 Vectors, Databricks, Snowflake, and OpenSearch into a graph for analysis, then export results back.

Learn more →

Session Manager

Manage the full lifecycle of a Neptune Analytics graph: create, import, analyze, export, and destroy — all from Python.

Learn more →

NetworkX Backend

Use familiar NetworkX APIs to run graph algorithms on Neptune Analytics — no code changes required. Just add backend="neptune".

Learn more →

Open Source

Apache 2.0 licensed, developed in the open by AWS Labs.

Learn more →

from nx_neptune.session_manager import SessionManager
session = SessionManager.session("fraud-detection")
graph = await session.get_or_create_graph(config={"provisionedMemory": 32})
# Define your Athena SQL to project nodes and edges
NODES = """
SELECT DISTINCT "~id", 'customer' AS "~label"
FROM (
SELECT "nameOrig" as "~id" FROM transactions
UNION ALL
SELECT "nameDest" as "~id" FROM transactions
);"""
EDGES = """
SELECT "nameOrig" as "~from", "nameDest" as "~to", "type" AS "~label",
"amount" AS "amount:Float", "isFraud" AS "isFraud:Int"
FROM transactions;"""
# Import, run Louvain, export back to Iceberg
await session.import_from_table(graph, s3_import_path, [NODES, EDGES],
catalog=catalog, database=database)