Skip to main content

Neptune Plugin for Nodestream

This plugin provides a Nodestream interface to Amazon Neptune.

It supports both Amazon Neptune Database and Amazon Neptune Analytics as targets, and provides:

  • Ingest - write nodes and relationships into Neptune from any Nodestream pipeline.
  • Copy - copy a graph between Neptune targets (e.g. Neptune Database → Neptune Analytics), or from Neptune to another Nodestream database such as Neo4j, with nodestream copy.

Requires nodestream >= 0.16, < 0.17.

Installation

pip install nodestream-plugin-neptune

Usage

Define Neptune targets in your nodestream.yaml:

# nodestream.yaml
targets:
  my-neptune-db:
    database: neptune
    mode: database
    host: https://<NEPTUNE_ENDPOINT>:<PORT>
    region: <AWS_REGION>
  my-neptune-analytics:
    database: neptune
    mode: analytics
    graph_id: <GRAPH_IDENTIFIER>
    region: <AWS_REGION>

Property values

Property values are sent to Neptune as openCypher parameters. The plugin writes str, bool, int, float and None values as they are, and a datetime as POSIX seconds (a float). Anything else (for example Decimal, date, timedelta, bytes, a dict, or a database driver's own temporal, spatial or vector type) raises a TypeError naming the property and node or relationship type, instead of failing later inside the connection. NaN and infinite floats are rejected too. Convert such values in your pipeline before they reach the writer.

Neptune openCypher cannot store a list as a property value. A multi-valued property is written as its first value and a warning is logged for every occurrence, so the loss is visible; an empty list is dropped.

Node keys

A node's identity is the native Neptune ~id, built from the node type and its key values (Label_key:value, keys sorted). Each key value is also written to the node as an ordinary property, so it can be queried (MATCH (n:Person {first_name: 'Zach'})) and used when copying. If a declared property has the same name as a key, the property wins, which keeps the original value of a key that nodestream normalized (by default string keys are lowercased); identity still uses the normalized key. Relationship key values are written as properties too.

The native ~id is never written as a property: Neptune Database rejects it, and Neptune Analytics would store a literal property named ~id. It is dropped with a warning if a pipeline tries to write it.

Nodes written by plugin versions before 0.16.2 kept their key only inside the ~id. Those nodes gain the key properties the next time they are written; until then, copy them out by keying on ~id (see below).

Copying between graphs

Copy nodes and relationships from one Neptune target to another:

nodestream copy --from my-neptune-db --to my-neptune-analytics --node Person --relationship KNOWS

Copy identity is derived from each type's key properties. To key on Neptune's native element id, declare ~id as the key in your schema.

A few things follow from how Neptune stores keys and ids:

  • The native ~id is used only as a key. If you key on anything else it is not copied as a property, because Neptune Database cannot write ~id as a property.
  • If a declared key is not stored as a property on the source nodes, a warning is logged once for that node type and nodestream skips (or only partially identifies) those nodes. This applies to nodes written before 0.16.2 (see above); key those types on ~id instead.
  • A relationship's native id is preserved as the property neptuneEdgeId. Neptune Analytics does not support custom edge ids and assigns its own.
  • Reads page through each type with SKIP/LIMIT (default page size 10,000). For large types, a warning suggests a larger page size to use with --retriever-option limit=<n>.

Known limitations

  • Neptune Database as a copy source is verified on engine version 1.4.6.3. To keep reads fast, the plugin pages through nodes and relationships with SKIP/LIMIT and no ORDER BY. On engine versions 1.4.7.0, 1.4.8.0, 1.4.8.1 and 1.5.0.0, unordered SKIP/LIMIT can skip and duplicate rows, so a copy can silently be incomplete. The plugin does not yet detect these versions or enforce ordering (#47). When copying out of Neptune Database, compare the node and relationship counts of the source and the target. Neptune Analytics is not affected.
  • Neo4j → Neptune copy does not work yet. The Neo4j plugin passes its driver types (such as neo4j.time.DateTime) through unchanged, including the last_ingested_at timestamps nodestream adds to every node, and this plugin refuses to write them. See nodestream-plugin-neo4j#50. Copying from Neptune to Neo4j, and between Neptune Database and Neptune Analytics, works.
  • A copy can change node ids. Copy rebuilds each node's ~id from its key properties, which keep their original case, while the pipeline that wrote the source lowercased string keys by default. The copy's ~ids can then differ from the source's, and running the original pipeline against the copy creates duplicate nodes. Use key_normalization: {do_lowercase_strings: false} in the source pipelines, or treat the copy as a separate graph. See #45.
  • Copying into an empty target can drop relationships. --preload-nodes does not make relationship writes wait for node writes. Relationships whose endpoints are not written yet are dropped silently. Copy the nodes first and the relationships in a second nodestream copy. See nodestream#466.
  • Server errors are logged, not raised. If a write still fails after its retries (for example repeated ConflictException on Neptune Analytics), the batch is logged and skipped and the run continues. See #46.

Metadata

Release files for nodestream-plugin-neptune 0.16.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nodestream-plugin-neptune 0.16.2
File Size Uploaded Provenance Actions
nodestream_plugin_neptune-0.16.2.tar.gz 26.6 kB With provenance Details for nodestream_plugin_neptune-0.16.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nodestream-plugin-neptune 0.16.2
File Interpreter ABI Platform Actions
nodestream_plugin_neptune-0.16.2-py3-none-any.whl Python 3 none any Details for nodestream_plugin_neptune-0.16.2-py3-none-any.whl

Total release size: 55.8 kB

Release files / nodestream_plugin_neptune-0.16.2.tar.gz

Download URL nodestream_plugin_neptune-0.16.2.tar.gz
Size 26.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0ee02602016400e0c10ae1eb214041afe10f0024f222f5c5be50d3a831e88830
BLAKE2b-256 checksum
How to use checksums
60b16b699cfdee701f04a3a8eecf2cf3694e9536e521f0ad2c5e9545eae98708
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / nodestream_plugin_neptune-0.16.2-py3-none-any.whl

Download URL nodestream_plugin_neptune-0.16.2-py3-none-any.whl
Size 29.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b190f6cc3e5d8208aa0a8a8fc1a3edb80d2fd31dde0255ff97b9d22bf43b9c96
BLAKE2b-256 checksum
How to use checksums
10bc359a12cd7ea517af5c2ed4959c302027414eaca84f508b3993338ed96eba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Security for nodestream-plugin-neptune 0.16.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nodestream_plugin_neptune-0.16.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page