Async-native Python client for the OrientDB binary protocol
Project description
aioorient
Async-native Python client for the OrientDB binary protocol. Typed, tested, pooled, and dependency-free. Targets OrientDB 3.0+ (v37/v38 wire protocol) on Python 3.13+.
Quickstart
import asyncio
from aioorient import Client
async def main() -> None:
async with await Client.connect(
"localhost", 2424, user="root", password="rootpw"
) as client:
async with client.database("demo", user="admin", password="adminpw") as db:
rows = await db.query("SELECT FROM Person WHERE age > :min", params={"min": 18})
for row in rows:
print(row["name"], row.rid)
asyncio.run(main())
Install
pip install aioorient
Zero runtime dependencies. An optional C extension accelerates record decoding and ships in the binary wheels; without it, a pure-Python decoder is used transparently.
Features
- Async-only. Everything is
await-ed; no sync wrapper, no blocking I/O. - Typed.
mypy --strictclean, shipspy.typed;dict[str, Any]only where OrientDB values are genuinely polymorphic. - Pooled by default. One
Client→ a server-level pool plus per-database query and batch pools, with health checks and back-pressure. No socket wrangling. - v38 transactions.
async with db.transaction() as tx:with MVCC-enforcedexpected_version. - Streaming queries.
async for row in db.query_stream(sql):pages under the hood without leaking server-side cursors. - Live queries.
async with db.live_query(sql) as sub:with a bounded buffer and clean three-way teardown. - Binary v37 codec. Full document encode/decode with varint + zigzag primitives and an optional C fast path.
- Object-graph mapper. Declarative vertices/edges, property descriptors, a chainable query DSL, atomic batches, and per-class brokers.
Documentation
Full guides live in docs/:
- Getting started
- Connections & pooling
- Queries · Transactions · Live queries
- Object-graph mapper
- Records & types · Exceptions
- TinkerPop / Gremlin
- Evaluation — benchmarks vs. other OrientDB Python clients
Object-graph mapper at a glance
from aioorient.ogm import Graph, declarative_node, String, Integer
Node = declarative_node()
class Person(Node):
element_type = "Person"
name = String()
age = Integer()
async with Graph(db, bases=[Node]) as g:
await g.init_schema()
alice = await g.create_vertex(Person, name="Alice", age=30)
adults = await g.query(Person).where(Person.age >= 18).order_by(Person.name).all()
See the OGM guide for the query DSL, batches, brokers, and traversals.
Gremlin traversals at a glance
OrientDB can execute TinkerPop 3 Gremlin traversals server-side; aioorient sends
them over the same binary connection via db.script(language="gremlin"). The
server binds g = graph.traversal(), so you write standard Gremlin directly
(needs the orientdb:3.2-tp3 image):
rows = await db.script(
"g.V().hasLabel('Person').has('age', gte(18)).valueMap('name', 'age')",
language="gremlin",
params={},
)
for row in rows:
print(row.fields)
Gremlin support is experimental. See the Gremlin guide for prerequisites, result shapes, and caveats.
Development
uv sync
uv run ruff check . && uv run ruff format --check .
uv run mypy src/aioorient tests
uv run pytest -m "not integration" # unit tier
Integration tests require Docker (the suite starts/stops OrientDB itself):
uv run pytest -m integration
See CONTRIBUTING.md for the commit conventions that drive automated releases.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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 aioorient-1.0.0.tar.gz.
File metadata
- Download URL: aioorient-1.0.0.tar.gz
- Upload date:
- Size: 103.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
323814153b38222a4d08dfc6a0063100403db6ee245accd692ac0fa1ee57d1dc
|
|
| MD5 |
c33f8d9c2ba5e8d8704b35c0fbee25f4
|
|
| BLAKE2b-256 |
71210649cda3ed0ae639a5aa772b7a776b64cc5967b7af69f99bb95fa4c8273d
|
Provenance
The following attestation bundles were made for aioorient-1.0.0.tar.gz:
Publisher:
release.yml on obonovai/aioorient
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aioorient-1.0.0.tar.gz -
Subject digest:
323814153b38222a4d08dfc6a0063100403db6ee245accd692ac0fa1ee57d1dc - Sigstore transparency entry: 2154206822
- Sigstore integration time:
-
Permalink:
obonovai/aioorient@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Branch / Tag:
refs/heads/master - Owner: https://github.com/obonovai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file aioorient-1.0.0-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: aioorient-1.0.0-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 125.1 kB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
951bc51d35e96779a50a2932423c66389c396d8a1d2b747cd6c4e97e1db98e96
|
|
| MD5 |
17e2359be00f113d5a82fec47221fb07
|
|
| BLAKE2b-256 |
53e772ca224a4c8e58eb00b83334e84c94cb396369e09ac214fd57ebc204129a
|
Provenance
The following attestation bundles were made for aioorient-1.0.0-cp314-cp314-win_amd64.whl:
Publisher:
release.yml on obonovai/aioorient
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aioorient-1.0.0-cp314-cp314-win_amd64.whl -
Subject digest:
951bc51d35e96779a50a2932423c66389c396d8a1d2b747cd6c4e97e1db98e96 - Sigstore transparency entry: 2154207473
- Sigstore integration time:
-
Permalink:
obonovai/aioorient@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Branch / Tag:
refs/heads/master - Owner: https://github.com/obonovai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file aioorient-1.0.0-cp314-cp314-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: aioorient-1.0.0-cp314-cp314-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 151.7 kB
- Tags: CPython 3.14, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46f14adc2c2d1860558114bc3007c15015d98916cb1197f05c44d8b748d19471
|
|
| MD5 |
0a3fd412645dc0a28b2cd1c8f0a9508c
|
|
| BLAKE2b-256 |
d9b64f44d4a2f0f36a035ffb172b1b4d160a21a25a4f5bd702ade20cc28a65c0
|
Provenance
The following attestation bundles were made for aioorient-1.0.0-cp314-cp314-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on obonovai/aioorient
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aioorient-1.0.0-cp314-cp314-musllinux_1_2_x86_64.whl -
Subject digest:
46f14adc2c2d1860558114bc3007c15015d98916cb1197f05c44d8b748d19471 - Sigstore transparency entry: 2154207397
- Sigstore integration time:
-
Permalink:
obonovai/aioorient@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Branch / Tag:
refs/heads/master - Owner: https://github.com/obonovai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file aioorient-1.0.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.
File metadata
- Download URL: aioorient-1.0.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
- Upload date:
- Size: 152.8 kB
- Tags: CPython 3.14, manylinux: glibc 2.28+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e9f367bb73cca4c08c4380e3f91d8c805c5295f87ade7759ca0397c62318a95
|
|
| MD5 |
281e696961163fc5e0f167a7ff6b9958
|
|
| BLAKE2b-256 |
7214f0629a3eb515f38a70a1715f5a9343a4152483247cf6888241fb81463d9f
|
Provenance
The following attestation bundles were made for aioorient-1.0.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:
Publisher:
release.yml on obonovai/aioorient
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aioorient-1.0.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl -
Subject digest:
4e9f367bb73cca4c08c4380e3f91d8c805c5295f87ade7759ca0397c62318a95 - Sigstore transparency entry: 2154206919
- Sigstore integration time:
-
Permalink:
obonovai/aioorient@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Branch / Tag:
refs/heads/master - Owner: https://github.com/obonovai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file aioorient-1.0.0-cp314-cp314-macosx_11_0_arm64.whl.
File metadata
- Download URL: aioorient-1.0.0-cp314-cp314-macosx_11_0_arm64.whl
- Upload date:
- Size: 122.3 kB
- Tags: CPython 3.14, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c741218aa3ec0e631bf321fe1367e9a02f3c62a28fabf8a588fb7e9a66dbb99a
|
|
| MD5 |
ce4fb7498190e138fe987865f574cd50
|
|
| BLAKE2b-256 |
ed263020df7b5e591f608f881098dc537575f83fea2e194724f3ea459d210264
|
Provenance
The following attestation bundles were made for aioorient-1.0.0-cp314-cp314-macosx_11_0_arm64.whl:
Publisher:
release.yml on obonovai/aioorient
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aioorient-1.0.0-cp314-cp314-macosx_11_0_arm64.whl -
Subject digest:
c741218aa3ec0e631bf321fe1367e9a02f3c62a28fabf8a588fb7e9a66dbb99a - Sigstore transparency entry: 2154207205
- Sigstore integration time:
-
Permalink:
obonovai/aioorient@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Branch / Tag:
refs/heads/master - Owner: https://github.com/obonovai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file aioorient-1.0.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: aioorient-1.0.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 124.8 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23f8d0a84a4c52bc1536f679c7a09a80532a6680db62d58169972f21430840e5
|
|
| MD5 |
75303e6df774186656374acec2781029
|
|
| BLAKE2b-256 |
1bbc943137b223e10d19f75ae364dd778993d69da1344aec6380b919b6f6109b
|
Provenance
The following attestation bundles were made for aioorient-1.0.0-cp313-cp313-win_amd64.whl:
Publisher:
release.yml on obonovai/aioorient
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aioorient-1.0.0-cp313-cp313-win_amd64.whl -
Subject digest:
23f8d0a84a4c52bc1536f679c7a09a80532a6680db62d58169972f21430840e5 - Sigstore transparency entry: 2154207565
- Sigstore integration time:
-
Permalink:
obonovai/aioorient@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Branch / Tag:
refs/heads/master - Owner: https://github.com/obonovai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file aioorient-1.0.0-cp313-cp313-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: aioorient-1.0.0-cp313-cp313-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 152.0 kB
- Tags: CPython 3.13, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6065d079a64723b042e28e14dd09de15fddaff14d62b63275d7b6a2b70c8c175
|
|
| MD5 |
ab4b679fe2f170d617002590e3f8e027
|
|
| BLAKE2b-256 |
090f91f670b61eec0b9d5f16ea95f4c08d4287c8b43a1e706a77abfae43c2544
|
Provenance
The following attestation bundles were made for aioorient-1.0.0-cp313-cp313-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on obonovai/aioorient
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aioorient-1.0.0-cp313-cp313-musllinux_1_2_x86_64.whl -
Subject digest:
6065d079a64723b042e28e14dd09de15fddaff14d62b63275d7b6a2b70c8c175 - Sigstore transparency entry: 2154207007
- Sigstore integration time:
-
Permalink:
obonovai/aioorient@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Branch / Tag:
refs/heads/master - Owner: https://github.com/obonovai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file aioorient-1.0.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.
File metadata
- Download URL: aioorient-1.0.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
- Upload date:
- Size: 153.0 kB
- Tags: CPython 3.13, manylinux: glibc 2.28+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4427109a76bb6be12470c55a11f8353da7c8b82eae32cd6855110781641c37c6
|
|
| MD5 |
d6f8a1ae38cc33e39699784cf75583f7
|
|
| BLAKE2b-256 |
401339a7e518afc0b359c5bf381ec864b6fd6ee8a9e6a4b4a75f79bcc4e844ae
|
Provenance
The following attestation bundles were made for aioorient-1.0.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:
Publisher:
release.yml on obonovai/aioorient
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aioorient-1.0.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl -
Subject digest:
4427109a76bb6be12470c55a11f8353da7c8b82eae32cd6855110781641c37c6 - Sigstore transparency entry: 2154207306
- Sigstore integration time:
-
Permalink:
obonovai/aioorient@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Branch / Tag:
refs/heads/master - Owner: https://github.com/obonovai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file aioorient-1.0.0-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: aioorient-1.0.0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 122.4 kB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6c1293d55a6f86cd39cc8851652d94eda62ca40c739c1522b96c32b822c9e31
|
|
| MD5 |
360de4c97f12756cf336fd6bd941da77
|
|
| BLAKE2b-256 |
8c8ddabeda4552037b01e3bf5efd4f65017bb626fb3f295ca2464c9d07148f11
|
Provenance
The following attestation bundles were made for aioorient-1.0.0-cp313-cp313-macosx_11_0_arm64.whl:
Publisher:
release.yml on obonovai/aioorient
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aioorient-1.0.0-cp313-cp313-macosx_11_0_arm64.whl -
Subject digest:
e6c1293d55a6f86cd39cc8851652d94eda62ca40c739c1522b96c32b822c9e31 - Sigstore transparency entry: 2154207103
- Sigstore integration time:
-
Permalink:
obonovai/aioorient@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Branch / Tag:
refs/heads/master - Owner: https://github.com/obonovai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@991344503f9b566fa72ddd120b11cfa49af0b4fb -
Trigger Event:
workflow_run
-
Statement type: