page:guides:starlette:build and start
Configure build and start for Starlette
Summary
Build and start for a Starlette app on Ample. Verified on Starlette: the app built and started with the documented commands and answered on its public HTTPS URL. Build and start: pip install into .ample/python from requirements.txt, then uvicorn from run.py reading PORT on the python-3.12 template.
Prerequisites
- A Starlette project (pip install into .ample/python from requirements.txt, then uvicorn from run.py reading PORT on the python-3.12 template)
- An Ample account token with servers:write
Tested Configuration
- Template: python-3.12
- Runtime: python
- Size: s-1vcpu-1gb
- Install: python3 -m pip install --target .ample/python -r requirements.txt
- Start: PYTHONPATH=.ample/python:${PYTHONPATH:-} python3 run.py
Workflow Steps
- Build and start
pip install into .ample/python from requirements.txt, then uvicorn from run.py reading PORT on the python-3.12 template; the server must bind 0.0.0.0 on PORT. - Deploy
Run the synchronous deploy once and read the result.
Command: ample deploy . --name --public --start "python3 run.py" - Verify
Fetch the live URL on the example; on failure read the build and runtime logs.
Command: ample logs --kind build
Success Checks
- App responds on its public URL
Limitations
- Verified on the python-3.12 template at s-1vcpu-1gb; other sizes and Starlette major versions are not verified.
- Region, compliance attestations, and request-duration limits are unknown and not claimed.
Evidence Summary
- Kind: canary_run
Summary: Starlette pattern fixture deployed on Ample (pip install into .ample/python from requirements.txt, then uvicorn from run.py reading PORT on the python-3.12 template); for this guide: the app built and started with the documented commands and answered on its public HTTPS URL.
Observed At: 2026-09-21T01:21:36Z
Implementation Revision: 50dbac567d2c5cc8e55e6c748a646be0025d9cfb-dirty (CLI 0.1.21)
Expires At: 2027-03-20T01:21:36Z
Cost Estimate
- Currency: USD
Monthly Amount: 5.0
Basis: size prices from pricing.toml (loaded by the API) at build revision 1ac5595375130d45290090e82ed0f554ccd45405-dirty
Components:- App server, size: s-1vcpu-1gb, quantity: 1.0, monthly amount: 5.0
- Note: Always-on monthly price of the tested sizes; apps auto-pause when idle. Buckets are allocation-priced per quota and not included.
Next Actions
- Browse the catalog index
- Search published recipes by intent, stack and constraints
- Prepare a side-effect-free deployment plan for an authorized project
- Read the existing agent authentication setup
- Browse Starlette
- Browse Configure deployment
- Browse Public web service
Examples
- Title: Starlette pattern fixture Description: Verified build and start on Starlette. Source Ref: tests/deploy-canaries/starlette-patterns
Resource Requirements
- Primitive: compute
Infrastructure Requirements
- Primitive ID: primitive:compute
Label: Compute
Status: verified
Summary: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.