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"toAuraClient. - Environment helper:
AuraClient.from_env()will readAURA_API_VERSION(defaults tov1).
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_versionproperty onAuraClientand 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75a148ce4be7752881d6b87f92fd32805f7c612448a1ca94c1f5fc103c34d635
|
|
| MD5 |
c75e5fbd14cc96ff0cc115c4b39a5b68
|
|
| BLAKE2b-256 |
ac5ccc47638188e9fe214352cd830840bf1580cf10edc673207bc6e12be13698
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neo4j_aura_sdk-0.1.3.tar.gz -
Subject digest:
75a148ce4be7752881d6b87f92fd32805f7c612448a1ca94c1f5fc103c34d635 - Sigstore transparency entry: 1180535317
- Sigstore integration time:
-
Permalink:
nodestream-proj/neo4j-aura-sdk@17c550b3655f8ffb450aa472e6c0de8ba786d4df -
Branch / Tag:
refs/tags/0.1.3 - Owner: https://github.com/nodestream-proj
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@17c550b3655f8ffb450aa472e6c0de8ba786d4df -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbe5ae1536369c5c744190ae0b6c701dc91b522d00e40a7b20e6739ff10b3cbe
|
|
| MD5 |
a0b58370b20149fcbe3384d974a0a5ee
|
|
| BLAKE2b-256 |
a243aea5b259b7eb76b140b1c4ccab35055bee53bca357637c23180ab1487142
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neo4j_aura_sdk-0.1.3-py3-none-any.whl -
Subject digest:
dbe5ae1536369c5c744190ae0b6c701dc91b522d00e40a7b20e6739ff10b3cbe - Sigstore transparency entry: 1180535354
- Sigstore integration time:
-
Permalink:
nodestream-proj/neo4j-aura-sdk@17c550b3655f8ffb450aa472e6c0de8ba786d4df -
Branch / Tag:
refs/tags/0.1.3 - Owner: https://github.com/nodestream-proj
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@17c550b3655f8ffb450aa472e6c0de8ba786d4df -
Trigger Event:
release
-
Statement type: