function.py is the source of truth for deploy behavior. Store runtime secret
values outside this file; keep only env var names, named secret references, and
non-secret configuration in source control.
function.py
Core Fields
| Field | Purpose |
|---|---|
name / mode | Stable Function name and job or service runtime shape. |
template / workdir | Machine template and working directory inside the guest. |
install / warmup / entrypoint | Dependency install, optional deploy-time warmup, and runtime command. |
bundle | Included and excluded local files uploaded during deploy. |
env / secrets | Runtime env var names and named secret references. |
resources / policy | CPU, memory, disk, timeout, internet/public URL, egress, volume, desktop, PTY, and resource policy. |
outputs / debug | Output paths and retained-machine debugging defaults. |
service | Service port, readiness check, and idle policy for HTTP services. |
routes / schedules | Named entrypoints and cron/period triggers. |
max_concurrency | Per-Function admission cap for job runs. |
Python And TypeScript Projects
Python and TypeScript projects use the samefunction.py descriptor. The
difference is the project files, install command, and entrypoint.
- Python
- TypeScript
function.py