ci.profile(), ci.load(), etc.) delegate to a
process-wide default Cirron instance. Instantiate the class directly
for self-hosted endpoints, multi-workspace setups, custom spool
directories, or test harnesses.
Cirron.
Resolution order
Every config value resolves in this order, first match wins:- Explicit constructor argument (or explicit function argument)
CIRRON_*environment variables (CIRRON_API_KEY,CIRRON_API_ENDPOINT,CIRRON_WORKSPACE_ID, …)~/.cirron/config.toml: written bycirron login(planned) or by hand- SDK defaults
~/.cirron/config.toml is a plain TOML file:
cirron.yaml project config
cirron.yaml is the project-level configuration file, shared across the
Cirron CLI, the SDK, and the platform. It lives at the project root.
cirron.yml and cirron.json are also accepted. The CLI, SDK, and
platform resolve them in that order, picking the first one they find.
The schema is identical across formats.
The full schema covers build, deploy, and serving metadata used by the
CLI and platform. See the CLI docs for the full
surface. The SDK itself reads a narrower subset:
Extra fields (e.g. the CLI’s
build, deploy, environments sections)
are tolerated. The SDK’s Pydantic model uses extra="allow" so the same
cirron.yaml feeds all three tools.
name, version, framework, and type are required; description,
profiling, servingConfig, env, secrets, and data are optional
and fall back to SDK defaults when omitted.
The SDK accepts both servingConfig (camelCase, matches the CLI/platform
convention) and serving_config (snake_case, matches Pydantic). They’re
interchangeable.
Example
Platform context env vars
When running inside a Cirron pipeline or deployment, the runner injects these automatically.ci.profile() reads them to set span attribution
and pick the transport:
For reading your own variables, see
ci.env. For
platform-mounted secrets, see ci.secret.
Error types
The top-levelcirron package exposes the SDK-wide error types:
cirron.core.errors (not re-exported yet):
CirronDatasetNotFound, CirronPlatformRequired, CirronDataSizeError.
See Errors for the full hierarchy and example handlers.
Next
Cirron class reference
Full constructor and method signatures.
Schemas
The spool JSON layout and snapshot layout.