Skip to main content

No project description provided

Project description

Neo4j Aura SDK for Python

This SDK provides a thin, async client for the Neo4j Aura HTTP API.

Highlights in this branch

  • Support for both v1 and v2beta1 endpoints.
  • Client-level API versioning and guards so v2 endpoints can't be called by a v1-configured client.
  • Models and helper methods for import jobs and IP filters (v2beta1).

Installation

Install from PyPI (when published) or install locally for development:

Using pip:

python3 -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -e .
# install test/runtime deps
pip install pytest httpx pydantic

Using poetry:

poetry install

API versioning

The client defaults to the v1 API surface. To call v2 endpoints (v2beta1) you must construct the client with an API version that begins with v2.

  • Constructor option: pass api_version="v2beta1" to AuraClient.
  • Environment helper: AuraClient.from_env() will read AURA_API_VERSION (defaults to v1).

The client enforces a guard for v2 endpoints: calling a v2 method when the client is configured for v1 will raise a clear ValueError indicating the API version mismatch. This prevents accidental use of v2 endpoints when the client is not configured for them.

Examples

Default (v1) client — v2 methods will be blocked:

from neo4j_aura_sdk import AuraClient

async with AuraClient.from_env() as client:  # AURA_API_VERSION default is 'v1'
    tenants = await client.tenants()
    # The following will raise ValueError because the client is v1:
    # await client.list_organization_ip_filters("org-id")

Create a v2beta1 client (allows v2 calls):

from neo4j_aura_sdk import AuraClient

async with AuraClient("id", "secret", api_version="v2beta1") as client:
    # Calls to v2beta1 endpoints (IP filters, import jobs) are allowed
    filters = await client.list_organization_ip_filters("org-id")

You can also set the environment variable AURA_API_VERSION=v2beta1 before calling AuraClient.from_env().

Usage

Minimal example (uses environment variables for credentials):

from neo4j_aura_sdk import AuraClient
import asyncio

async def main():
    async with AuraClient.from_env() as client:
        tenants = await client.tenants()
        print(tenants)

if __name__ == "__main__":
    asyncio.run(main())

Development

Run tests

With poetry:

poetry run pytest -q

With pip/venv:

source .venv/bin/activate
pytest -q

Build/publish

poetry build
poetry publish

Contributing

Please see CONTRIBUTING.md for contributor guidelines.

Notes

  • The repository now exposes an api_version property on AuraClient and provides clear guards for attempting v2 calls on a v1-configured client.
  • Several v1 and v2 methods include concise docstrings describing inputs and return models.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neo4j_aura_sdk-0.1.3.tar.gz (48.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neo4j_aura_sdk-0.1.3-py3-none-any.whl (50.6 kB view details)

Uploaded Python 3

File details

Details for the file neo4j_aura_sdk-0.1.3.tar.gz.

File metadata

  • Download URL: neo4j_aura_sdk-0.1.3.tar.gz
  • Upload date:
  • Size: 48.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for neo4j_aura_sdk-0.1.3.tar.gz
Algorithm Hash digest
SHA256 75a148ce4be7752881d6b87f92fd32805f7c612448a1ca94c1f5fc103c34d635
MD5 c75e5fbd14cc96ff0cc115c4b39a5b68
BLAKE2b-256 ac5ccc47638188e9fe214352cd830840bf1580cf10edc673207bc6e12be13698

See more details on using hashes here.

Provenance

The following attestation bundles were made for neo4j_aura_sdk-0.1.3.tar.gz:

Publisher: release.yaml on nodestream-proj/neo4j-aura-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file neo4j_aura_sdk-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: neo4j_aura_sdk-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 50.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for neo4j_aura_sdk-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dbe5ae1536369c5c744190ae0b6c701dc91b522d00e40a7b20e6739ff10b3cbe
MD5 a0b58370b20149fcbe3384d974a0a5ee
BLAKE2b-256 a243aea5b259b7eb76b140b1c4ccab35055bee53bca357637c23180ab1487142

See more details on using hashes here.

Provenance

The following attestation bundles were made for neo4j_aura_sdk-0.1.3-py3-none-any.whl:

Publisher: release.yaml on nodestream-proj/neo4j-aura-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page