Skip to main content

o11y-one

The Python client for the O11y One API. A thin, hand-written layer over the generated o11y-one-api-agentic package.

Install

uv add o11y-one        # or: pip install o11y-one

Use

import os

from o11y_one.sdk import O11yClient, Disposition, classify
from o11y_one.agentic.v1.evaluation_pb2 import ListEvaluationDefinitionsRequest
from o11y_one.agentic.v1.evaluation_connect import AgenticEvaluationServiceClientSync

o11y = O11yClient(
    base_url="https://grpc.o11y.one",
    credential=os.environ["O11Y_API_KEY"],  # o11y_mach.<selector>.<secret>
    org_id=os.environ["O11Y_ORG_ID"],
)

evals = o11y.service_sync(AgenticEvaluationServiceClientSync)
try:
    defs = evals.list_evaluation_definitions(ListEvaluationDefinitionsRequest())
except Exception as err:  # noqa: BLE001 - classify sorts it out
    failure = classify(err)
    if failure.disposition is Disposition.INSUFFICIENT_SCOPE:
        raise SystemExit(f"credential is missing scope {failure.missing_scope}") from err
    raise

What is here, and what deliberately is not

Three modules and nothing else:

module responsibility
o11y_one.sdk.client transport construction, credential and scoping header injection
o11y_one.sdk.auth the credential wire format and local structural validation
o11y_one.sdk.errors the failure taxonomy: reauthenticate / insufficient-scope / version-skew / retry / unclassified

Service methods are not wrapped. o11y-one-api-agentic already ships a client class per service; a hand-written facade over all of them would be a second API surface to keep in sync with the proto, and it would rot the first time a field is added upstream. Import the generated client class and hand it to O11yClient.service_sync() / O11yClient.service().

The distinction this package exists to preserve

UNAUTHENTICATED and PERMISSION_DENIED are different problems:

  • UNAUTHENTICATED — the credential is absent, malformed, unknown, expired, or revoked. Re-auth. Retrying cannot change the answer.
  • PERMISSION_DENIED — the credential is fine; it lacks a scope (the server names which one) or it was presented to a non-machine surface.

classify() keeps them apart, along with UNAVAILABLE (auth backend down — retry with backoff) and INVALID_ARGUMENT (SDK/server version skew). Collapsing these into a single "auth error" is the failure mode this module exists to prevent.

Credentials

A machine credential is o11y_mach.<selector>.<secret>, presented in the x-o11y-key header. It is:

  • returned exactly once, by CreateMachineCredential. There is no read-back RPC and no recovery path — lose it and you rotate.
  • rotated create-then-revoke, not atomically. A principal may hold several active credentials at once, which is what makes zero-downtime rotation work: create the new one, deploy it, then revoke the old.
  • revoked effective on the next request, not on a TTL boundary.
  • expiring at +365 days by default, capped at three years.

Never send it as authorization: Bearer — that path carries the browser session JWT and a machine credential presented there is rejected.

Release files for o11y-one 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for o11y-one 0.1.1
File Size Uploaded
o11y_one-0.1.1.tar.gz 22.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for o11y-one 0.1.1
File Interpreter ABI Platform
o11y_one-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 48.5 kB

Release files / o11y_one-0.1.1.tar.gz

Download URL o11y_one-0.1.1.tar.gz
Size 22.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a1620ef3b7fc6f6a8069710267ffcb80ecfe6c4c5512f44aed7b4341b1ccdc43
BLAKE2b-256 checksum
How to use checksums
ef88d5ffcffd3916a756fe82ff17db9056e83d82bb21dc70a850165d4b149588
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / o11y_one-0.1.1-py3-none-any.whl

Download URL o11y_one-0.1.1-py3-none-any.whl
Size 26.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9f49e82158e8f827f14e9504f563b16f4cc6daa0d3fd11c58909aeb43bc9853
BLAKE2b-256 checksum
How to use checksums
4d5c85724e25f18e1086cd0610a490f410d75ead5e827edbf3b669d347ad0046
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.1.3

2 release files

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page