Skip to main content

k9o — Kilimanjaro platform SDK (Python)

Idiomatic Python SDK. Snake_case methods; raise KError on error; data DSL via client.from_("collection").select(); typed envelope with meta accessor sugar.

Status

v0.1.0 — first-pass idiomatic ship (P3 wave 1; reshape from prior k9o_gate OpenAPI codegen).

Surfaces shipped:

  • create_client(...) factory + baseUrl validation per ch13 §7
  • KError(Exception) with kerror_from_wire rehydration
  • Envelope + typed Meta accessor (MetaCursor / MetaSubscription / MetaIdempotency / MetaWarning / MetaTiming / MetaContext) per ch01 §1 + ch13 §5
  • URL grammar v2.5.68 (validate_base_url / validate_slug / project_path / org_path / platform_path)
  • Data-plane DSL: client.from_(collection) with chainable filter builder (.eq / .neq / .gt / .gte / .lt / .lte / .in_ / .not_in / .like / .ilike / .is_ / .filter) + .limit / .cursor / .count + terminal verbs (.select().execute() / .insert() / .update().eq("id", ...).execute() / .delete().eq("id", ...).execute())
  • client.projects.{list,create,get,update}
  • client.ai.embed(input, model=None) (platform embeddings; requires project_slug)
  • client.gate.{sign_up,sign_in,sign_out,whoami,refresh_token,verify_session,hosted} (project-scoped auth)
  • client.storage.{create_bucket,get_bucket,list_buckets,update_bucket,delete_bucket} and client.storage.from_(bucket).{upload,create_signed_url,list,remove} (buckets and objects; _async twins; requires project_slug; expires_in is required, 1..604800)
  • Sync (request) + async (request_async) HTTP via httpx

Install

pip install k9o

(Pre-launch: install from monorepo source via pip install -e packages/python.)

Quick start

import os
from k9o import create_client, KError

k9o = create_client(
    base_url="https://acme.api.k9o.io",
    api_key=os.environ["K9O_API_KEY"],
    org_slug="acme",
    project_slug="member-portal",
)

try:
    response = k9o.from_("posts").select().limit(10).execute()
    for row in response.data:
        print(row)
    if response.meta.cursor:
        print("next cursor:", response.meta.cursor.next)

    session = k9o.gate.sign_in(email="user@example.com", password="…")
    print("signed in:", session.data["user"]["id"])
except KError as e:
    print(f"[{e.code}] {e.message}: {e.recommendation}")
    raise

Idiomatic shape (per ch13)

Aspect This SDK
Package name k9o (PyPI)
Method casing snake_case
Constants SCREAMING_SNAKE_CASE
KError delivery raise KError (catch with except KError as e:)
Data DSL entry client.from_("collection") (from is a Python keyword; from_ is the idiomatic mapping)
Filter chain .eq() / .gt() / .in_() / .is_() (_ suffix on Python reserved-keyword names)
Terminal verb .execute() (explicit; async parallel .execute_async())
Meta accessor response.meta.cursor.next, response.meta.timing.total_ms, response.meta.context.request_id (snake_case attrs translated from camelCase wire)
Wire format Always camelCase JSON (ch01 §3.3 invariant) — translated at boundary
Runtime Python 3.10+
HTTP library httpx (sync + async; modern)

License

UNLICENSED — internal to Kilimanjaro.

Metadata

Release files for k9o 1.0.0

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

Source distribution (sdist)

Source distribution for k9o 1.0.0
File Size Uploaded Provenance
k9o-1.0.0.tar.gz 64.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for k9o 1.0.0
File Interpreter ABI Platform
k9o-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 123.1 kB

Release files / k9o-1.0.0.tar.gz

Download URL k9o-1.0.0.tar.gz
Size 64.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2405ec236440fbd19ff2c5dd028411010738c868dd363688bffbec8f57c48a74
BLAKE2b-256 checksum
How to use checksums
e65f6dfc665c80cbeab495adc2e9d183bd1ab340a8a146ffc964a57b4b84c1d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / k9o-1.0.0-py3-none-any.whl

Download URL k9o-1.0.0-py3-none-any.whl
Size 58.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e336c9ef617993275f78496325e855fe818769128f829887e8694d15c848cb9
BLAKE2b-256 checksum
How to use checksums
3589174cf3922a06c5f8f638a1964c75747573df04dbd07f2d7cc6567eab9610
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for k9o 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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