point two examples at the addresses their APIs moved to

`hello` called KeysApi.get_keys(). There is no /v1/keys — API keys are one noun
at /v1/account/keys, so the call is AccountApi.get_account_keys().

`store` called KvApi.post_kv/get_kv_by_name/delete_kv_by_name. /v1/kv is the KV
DATA plane now, addressed by bucket and key; provisioning a KV instance — which
is what this example does — is /v1/provisioning/kv. Same ProvisionRequest, same
three steps, so it is a rename rather than a rewrite.

Both were caught by the examples gate and neither had been true for days, which
is why this repo's pipeline has been red since 2026-08-21 and no regenerated
client has published since.

examples.models is untouched: /v1/models is published and answers 200, and its
operationId is get_models, so ModelsApi appears once the client is regenerated —
which the pipeline does before it tests.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-08-23 16:10:25 -07:00
co-authored by Hanzo Dev
parent 5ddeca6b5a
commit a43b78eaaf
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -26,14 +26,14 @@ document.
python -m examples.hello
"""
from hanzoai.cloud import KeysApi
from hanzoai.cloud import AccountApi
from examples.client import BASE_URL, client, run
def main() -> None:
with client() as api:
listing = KeysApi(api).get_keys()
listing = AccountApi(api).get_account_keys()
keys = listing.keys or []
print(f"hello from {BASE_URL}")
+5 -5
View File
@@ -18,7 +18,7 @@ rather than leaving it billable for the next run to collide with.
import time
from hanzoai.cloud import ProvisionRequest, KvApi
from hanzoai.cloud import ProvisionRequest, ProvisioningApi
from examples.client import client, run
@@ -27,17 +27,17 @@ NAME = f"example-store-{time.time_ns()}"
def main() -> None:
with client() as api:
kv = KvApi(api)
kv = ProvisioningApi(api)
kv.post_kv(ProvisionRequest(name=NAME))
kv.post_provisioning_kv(ProvisionRequest(name=NAME))
print(f"provisioned {NAME}")
try:
store = kv.get_kv_by_name(NAME)
store = kv.get_provisioning_kv_by_name(NAME)
print(f"read back: {store.name} · {store.kind} · status {store.status}")
print(f" host {store.host}:{store.port}")
finally:
kv.delete_kv_by_name(NAME)
kv.delete_provisioning_kv_by_name(NAME)
print(f"deleted {NAME}")