Aura API v1 Python SDK (sync and async) - #1
Merged
Merged
Conversation
Phase 2 of PLAN.md. Adds AuraClient (options, from_env, context manager), the AuraError exception hierarchy, the HttpTransport protocol with an httpx implementation, network-only retries with a per-call deadline, OAuth token caching, and the authenticated request service. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 3 of PLAN.md. Adds frozen dataclass models for every v1 request and response, StrEnums with tolerant parsing, a stdlib-only serde module, and a test that parses every 2xx example in the OpenAPI spec with its model. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 4 of PLAN.md: every method of the Go SDK's v1 service interfaces, wired onto AuraClient, with Go's client-side ID and config validation run before any request. Overwrite responses and list filters follow the spec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 5 of PLAN.md. Adds instance sizing and upgrade, CMEK get/create/delete, tenant/instance/organization list filters, and the storage, vector and graph analytics update fields. A test now maps every spec operation to a method. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 6 of PLAN.md. Adds client.prometheus (fetch_raw_metrics, get_metric_value, get_instance_health) with Go's thresholds, a text-format parser whose output matches Go's expfmt, and a guard that only sends the Aura token to https://*.neo4j.io metrics URLs. Drops the prometheus extra. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 7 of PLAN.md. Full README, Python ports of the Go v1 examples, a black-box suite over real sockets with the httpx transport, opt-in live integration tests (read-only unless writes are enabled), a changelog, and a tag-triggered workflow that tests, builds and publishes to PyPI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Phase 8 of PLAN.md. Service operations are now pure Call descriptions run by sync and async executors; retry policy, token handling and request building are shared. Adds AsyncAuraClient, AsyncHttpTransport and an httpx async transport, plus tests that every async method matches its sync twin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first live run showed GET /instances/{id} returning connection_url: null
for some instances, which the spec marks required; Instance.connection_url
is now optional. SDK errors now print under their public name and their
tracebacks stop at the public method instead of listing internal frames.
Live CMEK and session tests skip on 403 instead of failing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a Python SDK for the Neo4j Aura API v1, modelled on aura-go-sdk and covering the whole v1 spec. The design and every decision are recorded in PLAN.md. The commits follow its phases, so reviewing commit by commit is the easiest way through.
What's included
AuraClient, plusAsyncAuraClientfor asyncio. Both have the servicestenants,instances,snapshots,cmek,graph_analyticsandprometheus.updatefields.HttpTransportinterface. A test fails if any other module imports a third-party package, or if a public signature exposes an httpx type.StrEnums. A value the SDK doesn't know yet stays a plain string instead of breaking parsing.NotFoundError,RateLimitErrorwithretry_after, and so on), keeping the Go SDK's helpers.expfmton the same input and is identical.Testing
mypy --strictare clean.uv run pytest -m integrationBefore the first release
release.ymland environmentpypi, and create that environment in the repo settings.__version__, add a matching## vX.Y.Zsection to CHANGELOG.md, and push the tag.release.ymlthen tests, builds, publishes and creates the GitHub release.🤖 Generated with Claude Code