Python hosting
Give a web app a public route, keep a queue worker listening, or run a Python report every hour. Scheduled scripts get a UTC interval, a time limit and a record of each run.
main.pyJOB_INTERVAL_SECONDS=3600
JOB_TIMEOUT_SECONDS=300
Download the report script
Python web apps, consumers and scheduled work
ASGI and WSGI applications
Serve a FastAPI or Flask project with its matching server package. Set the import path to the application object and bind to the assigned port. A small health route makes a framework or routing error easier to locate.
Configure a Python web serverRepeat a script on a UTC interval
Choose a scheduled deployment for an hourly report or feed import. Set a timeout for each run. Runs records when the script finishes and helps you see when downtime or overlap left a gap.
Investigate a missed runProcess events as they arrive
A Python worker can wait on a queue between events. Log each batch as it completes and flush progress messages when diagnosing a slow consumer. The worker example prints a heartbeat you can watch after startup.
Download the Python workerInstall only the dependencies you use
Put your package versions in requirements.txt and reinstall for the hosted interpreter. Leave local virtual environments on your machine. This matters especially for packages with native extensions built on a different operating system.
Prepare a Python deploymentChoose how Python runs
Use a service for a process that waits for events or requests. Use a job for a script with a natural finish, such as reconciling yesterday’s orders. The scheduler can repeat that same script on a UTC interval.
- Deploy Always-on worker on Spark
Always-on worker
Keep a bot or queue consumer alive between events. Use Console to follow its progress.
- Deploy Python web app on Spark
Python web app
Use a Python HTTP server with an ASGI or WSGI application.
- Deploy One-off Python script on Spark
One-off Python script
Run a Python script on demand with a timeout and run history.
- Deploy Scheduled Python script on Spark
Scheduled Python script
Run a scraper or task on a recurring UTC interval.
Take a Python project from files to first run
Prepare the environment
Upload the project or connect GitHub. Put
requirements.txtin the project root with the script you want to run. SetMAIN_FILEto the entry point. Store credentials in Variables.Start a service or bring up the runner
For an ASGI or WSGI project, include the server dependency and set
RUN_COMMANDto install dependencies and launch the correct module on0.0.0.0andSERVER_PORT. For a finite script, start the runner and choose Run now in Runs.Verify a result before repeating it
Open the platform address for the web example and request
/api/health. For the report example, inspect the exit code and the printed completion time. To repeat it hourly, save the interval and timeout shown above, restart and check the next occurrence in Runs.
Turn a local report into a scheduled job
An hourly report needs a clear answer to two questions. Which period did this run process, and can you safely run it again if writing the result was interrupted?
Read the scheduled job troubleshooting guideGive each report a UTC period
Choose a key such as the date and hour for the data being reported. Save results under that key so a manual rerun can replace the same period. Write the completion marker only after the result has been stored.
Time a representative batch
Start the runner and use Run now before setting the recurring interval. Check the exit code, duration and a saved result. Set a timeout that covers a realistic batch and use smaller batches if a single run regularly overruns the interval.
Verify the next boundary
Restart after saving the schedule and check Runs after the next UTC boundary. Compare the last completed period with the period in your stored output. If one is missing, backfill that period once and check the result before resuming.
Python hosting plans
One account plan covers your deployments. Divide its memory, storage and CPU among the projects you run together.
| Plan | Memory | Storage | CPU | Deployments | File backup | History | Per year |
|---|---|---|---|---|---|---|---|
| Spark | 256 MB | 512 MB | 25% | 1 | Every hour | 24 hours | $0.00 |
| Relay | 1 GB | 5 GB | 50% | 2 | Every 15 minutes | 3 days | $22.50 |
| Circuit | 2 GB | 8 GB | 100% | 4 | Every 15 minutes | 7 days | $32.50 |
| Grid | 4 GB | 15 GB | 200% | 8 | Every 5 minutes | 14 days | $60.00 |
| Fleet | 8 GB | 25 GB | 250% | 12 | Every 1 minute | 30 days | $90.00 |
Spark1 deployment$0.00
- Memory
- 256 MB
- Storage
- 512 MB
- CPU
- 25%
- Deployments
- 1
- File backup
- Every hour
- History
- 24 hours
Relay2 deployments$22.50
- Memory
- 1 GB
- Storage
- 5 GB
- CPU
- 50%
- Deployments
- 2
- File backup
- Every 15 minutes
- History
- 3 days
Circuit4 deployments$32.50
- Memory
- 2 GB
- Storage
- 8 GB
- CPU
- 100%
- Deployments
- 4
- File backup
- Every 15 minutes
- History
- 7 days
Grid8 deployments$60.00
- Memory
- 4 GB
- Storage
- 15 GB
- CPU
- 200%
- Deployments
- 8
- File backup
- Every 5 minutes
- History
- 14 days
Fleet12 deployments$90.00
- Memory
- 8 GB
- Storage
- 25 GB
- CPU
- 250%
- Deployments
- 12
- File backup
- Every 1 minute
- History
- 30 days
Prices in USD before tax. A year costs the same as ten monthly payments.
Compare all plan featuresCan a small Python script run on the free plan?
A small script can fit within Spark. Check peak memory while installing packages and processing a real batch. The free scheduled profile supports intervals of 15 minutes or longer. Renew the account’s free plan in the dashboard.
Which profile fits a Python bot?
For an existing Discord or Telegram bot, use its service page to select the matching framework and set its provider token. A Python worker is useful for a separate process that blocks on events. A scheduled job suits finite work that exits.
Should my scheduled script sleep between runs?
Let the script process one batch and exit. The runner handles the wait until the next UTC boundary. If a previous run is still active at that boundary, the runner skips the overlapping occurrence.
What happens to reports missed during downtime?
Runs records missed occurrences and advances to the next boundary. Keep a completed-period marker in your own data so a manual backfill can safely pick up unfinished work.
Why did a web deployment exit successfully?
A script can finish with exit code zero after defining an app. Launch an ASGI or WSGI server pointed at the module and application object, then test an actual route over HTTPS.