Skip to main content
This page is for developers taking a working local file to production. Prerequisites: a CYCLS_API_KEY from Cycls Cloud, set in the environment or in a .env file beside your code.

Naming

The deployment name is the decorator’s name= or the function name, and it becomes the subdomain:
Redeploying the same name updates it in place. Names are checked for availability before the archive uploads, and the error names the conflict. To pick one target out of a file with several decorated objects:

What deploy produces

Deploy reads the shape of the decorated function:

Sizing and limits

Instances scale to zero when idle, so an unused deployment costs nothing and the next call pays a cold start of a few seconds.

Environment variables

Values reach the container two ways.
  1. Bundle a dotenv file with the image. The SDK loads .env automatically at import.
  2. Read os.environ inside the function body for values the platform injects, such as CYCLS_VOLUMES.
Keep CYCLS_API_KEY out of the image. It is a deploy credential, not a runtime one. See Environment variables for the full list.

Calling a deployed endpoint

Authentication is a token derived as sha256(api_key : name), computed independently by the deployer and the caller and stored nowhere. Any machine holding your CYCLS_API_KEY can call your deployments, and nothing else can. Rotating the key strands existing services, because their baked token came from the old key. Remove and redeploy them after a rotation. Every call carries its Python and cloudpickle versions. The endpoint refuses a pickle that cannot cross the boundary and returns an explicit error instead of a confusing unpickle failure. Redeploy from the calling environment to resolve it.

Isolation boundary

Deployments under one account share a trust domain. Code running in one can reach another’s workspace storage. For hard isolation, such as production against experiments or separating clients, deploy from a separate organization. Each organization is its own tenant with its own boundary.

Removing a deployment

cycls rm deletes the deployment and detaches its volumes. Volume data is not touched, and redeploying the same name reattaches it with files intact. Deleting data is always explicit:

Deploying from Python

Keep these out of module scope. Every command imports your file, so a top-level deploy() fires during cycls shell and cycls deploy too.

Next

Observability

Logs, error references, cost and SQL over both.