Image
cpsl.Image defines the runtime environment for your app. If the app needs Python packages, system packages, or setup commands, this is where they go.
Worked example
This is a realistic app-level deployment config:Constructor
Methods
python_packages can be a list or a path to requirements.txt.
Theme
Configure app branding with app.theme(...).
Most apps do not need a fully custom theme. A preset plus a few overrides is usually enough:
Presets
Built-in presets:darklightmidnightwarm
Common theme fields
FileSystem
Use cpsl.FileSystem("name") to mount named durable storage into the runtime:
Deployment-related app knobs
Pricing
Capsule uses cents for pricing:one_timemonthly
Warm runtimes
Secrets and filesystems
These are deployment config, not runtime afterthoughts:Class-based deploy config
For class-based apps, the deploy-specific knobs live on@app.cls(...) instead of the App(...) constructor: