osyra_ome.aio
Private pre-release / network boundary: The currently usable customer surface is offline verification of an existing signed artifact against an out-of-band trust anchor. Memory/network RPC APIs and host snippets on this page describe protocol and interface shape; the public Edge bridge, package publication, and release acceptance remain pending. Do not treat
api.osyra.ai:443examples as a released customer route.
Async :class:`OmeAsyncClient` — grpc.aio transport + namespaced sub-clients.
Mirror of the sync :class:`osyra_ome.OmeClient` with async-def methods on the same namespaced sub-clients (per design doc §4.1.5 sync-vs-async distinction). The constructor signature is identical to the sync client.
>>> import asyncio >>> from osyra_ome import OmeAsyncClient >>> async def main(): ... async with OmeAsyncClient(target="api.osyra.ai:443", token="ey...") as client: ... claim_id = await client.memory.write_claim(claim) ... ok = await client.verify.receipt(signed.encoded_cbor, signed.sig, trusted_pub) >>> asyncio.run(main())
API parity with the sync client (every method-name + sub-client namespace matches) is enforced by ``tests/test_client_async.py::test_namespace_shape``; the cross-language parity gate (ADR-045) re-runs the equivalent shape test against the TypeScript sibling.
Classes
class OmeAsyncClient
Async gRPC client for the Osyra Memory Engine (OME) service.
Functional mirror of :class:`osyra_ome.OmeClient` — same constructor kwargs, same namespaces, async-def methods.
Lifecycle:
- Construction creates an idle
grpc.aio.Channel; first call dials. await close()performs graceful shutdown (5s default).- Supports async context-manager protocol:
async with OmeAsyncClient(...) as client:.
Methods
__init__
def __init__(self, target: str, *, token: str | None = None, workspace_id: str | None = None, workspace_tier: str | None = None, timeout_seconds: float = DEFAULT_DEADLINE_SECONDS, insecure: bool = False, channel_options: list[tuple[str, object]] | None = None) -> Noneclose (async)
async def close(self, *, grace_seconds: float = DEFAULT_CLOSE_GRACE_SECONDS) -> NoneGracefully shutdown the gRPC channel.