Python apps
Run Python apps from the panel
Create a job or a worker, upload your code, add requirements.txt, then run it and read its logs.
Learning path · step 19 of 20
On this page
FiniteHost runs your Python scripts for you. You upload the code, choose whether it is a job (runs, then stops) or a worker (keeps running), and press a button. There is no server to set up and no SSH shell to learn: everything happens in the panel under Python apps.
Typical uses: a script that checks prices every morning, a report that runs every hour, a Telegram bot that answers messages all day, or a small data job that writes into your website's database.
Before you start#
- You need a plan that includes Python apps. Web plans Spark and Starter do not.
| Plan | Python apps |
|---|---|
| Pro | 1 |
| Business | 3 |
| Scale | 10 |
| Compute Nano | 1 |
| Compute Small | 3 |
| Compute Medium | 6 |
| Compute Large | 12 |
- Your code should start from one
.pyfile (for examplemain.py) and run with Python 3. - If it needs packages from PyPI, list them in a
requirements.txtfile next to your code. - Read the rules for apps once: apps send email only through FiniteHost's mail server (Send email from your website or app) and cannot receive web traffic.
Jobs and workers#
| Job | Worker | |
|---|---|---|
| What it does | Runs, then stops | Keeps running |
| Good for | Scheduled scripts, reports, imports, alerts | Bots, queue consumers, anything that waits for events |
| How it starts | Run now, or on a schedule | Start |
| Time limit | Stopped after 1 hour | None |
| If it crashes | The run is marked failed; the next scheduled run tries again | Restarted automatically after 5 seconds, waiting longer each time (up to 5 minutes) |
You choose the mode when you create the app. A worker cannot have a schedule.
Create an app#
- Open Python apps in the left menu (group Software), or press
/and type "python". - Enter an App name, such as
price-bot. Use 2 to 31 lowercase letters, digits and dashes, starting with a letter. The name becomes the folder/apps/price-bot. - Check the Entry file. It is
main.pyunless you change it. It is the file Python starts, given as a path inside the app folder, for examplemain.pyorsrc/run.py. - Choose the Mode: Job: runs, then stops or Worker: keeps running.
- Choose a Schedule (jobs only): Only when I press Run, Every 5 minutes, Every 15 minutes, Every hour or Daily at a time (IST). See Schedules.
- Press Create app. The panel says "App created. Upload its code, then run or start it."
Upload your code#
You can upload in the panel or over SFTP. Both put files in the same folder, /apps/<name>.
In the panel#
- Find the app's card and its box that says Upload code.
- Drop a file on the box, or click it and choose a file. A single
.pyfile is copied as it is; a.zipis unpacked into the app folder. - Wait about a minute. The panel shows "… uploaded. It lands in the app folder within a minute."
Rules for uploads:
- Up to 20 MB per file. File names may use letters, digits, dot, dash and underscore.
- A zip may hold up to 5,000 files and 200 MB once unpacked.
- If every file in the zip sits inside one top-level folder (for example
price-bot/main.py), that folder is removed, somain.pylands directly in/apps/price-bot. - Links and paths that try to leave the folder (
..) are refused, and the whole upload fails. - Uploading again overwrites files with the same name. Files you no longer ship are not deleted; remove them over SFTP.
Over SFTP#
Connect as described in Connect with SFTP, open /apps/price-bot and copy your files in. This is the better way for many small edits, or to delete old files.
Add requirements.txt#
Put a requirements.txt file in the app folder, next to the entry file:
requests==2.32.3Before your app starts, FiniteHost creates a private virtual environment for the app and installs these packages into it. The install runs again only when requirements.txt changes, so normal starts stay fast. The first start (with the install) may take a few minutes; the server allows up to 15 minutes for it before giving up.
Run, start and stop#
The buttons on each app card:
| Button | Mode | What happens |
|---|---|---|
| Run now | Job | Queues one run now. "Queued. The server starts it within 30 seconds; logs appear here." |
| Enable schedule | Job | Turns the schedule on. |
| Pause schedule | Job | Turns the schedule off. A run in progress finishes. |
| Start | Worker | Starts the worker and keeps it running. |
| Stop | Worker | Stops the worker. |
| Refresh (circular arrow) | Both | Reloads the status and logs. |
You can press Run now even while a job's schedule is paused, which is the easiest way to test. A job cannot run twice at the same time: if it is already queued or running, the panel says "This job is already queued or running".
Read the logs#
Under each app you see:
- Last run: its state (queued, started, finished or failed), the exit code and when it ran. "waiting for the server" means the run is queued.
- next …: when a scheduled job runs next.
- Logs: the last 120 lines your app printed (both
print()output and errors), with timestamps. Open the Logs box and press refresh to see new lines.
An exit code of 0 means success. Anything else, or a Python traceback, means the run failed. See Fix a failing Python app.
Troubleshooting tips#
- Nothing in the logs after Run now: wait 30 seconds and press refresh. On the first run, installing requirements.txt can take a few minutes.
- "Run now is for jobs. Start a worker instead": you pressed Run on a worker. Use Start.
- "… does not include Python apps": your plan has no apps. See Upgrade your plan.
- "Apps can be added while the plan is active": renew first; see Renewals and expiry.
- Can't find your file: paths in your code are relative to the app folder, which is also the working directory.
What's next#
Was this helpful?
Still stuck?
Email support@finitehost.com with your subscription ID (it starts with t, shown on the panel's Dashboard) and what you tried. A person replies, usually within one business day.
Last updated 27 October 2026. Found something wrong? Tell support@finitehost.com.