Python
Sync and async clients.
pip install chronicle-sdkTypeScript
Fully typed.
npm install @chroniclelabs/sdkJavaScript
Same package, no types needed.
npm install @chroniclelabs/sdkGo
Context-aware, typed params.
go get github.com/chronicle-labs/chronicle-goRust
Async, typed, explicit errors.
cargo add chronicle-sdkCreate a client
SetCHRONICLE_API_KEY and CHRONICLE_API_URL, or pass them in.
Python
Use the guide examples
Resource-guide snippets continue with the configuredclient above. Keep the
IDs returned by one step for the next. Follow a language’s installation page
for a complete first-evaluation program.
- Python: run the snippets in one script or session. Import additional types from
chronicle.typeswhen needed. - TypeScript / JavaScript: use ES modules and top-level
await; paste sequential steps into one module. - Go: put fragments inside a function returning
error, withctx context.Context. Importchronicle, plus standard packages used by that fragment (context,fmt,time,errors,os, orencoding/json). Pass a context with a deadline to wait methods. - Rust: put fragments inside an async function returning
Result<(), Box<dyn std::error::Error>>; importchronicle_sdk::{Chronicle, types::*}andstd::time::Duration. File export also usesserde_json.
Resources
Naming
Shared behavior
- Pages: list methods return a page with
items,has_next_page(), andget_next_page(). Python addsauto_paging_iter(); TypeScript pages are async iterables. - Waiting:
worlds.wait,twins.wait, andevaluations.waitpoll until the resource reaches a final state. - Retries: two automatic retries on transient failures, honoring
Retry-After. See Errors and retries. - Types: request and response models are exported (
chronicle.typesin Python, top-level in TypeScript, thechroniclepackage in Go,chronicle_sdk::typesin Rust).