Deploy Python web apps, workers and scheduled scripts
Serve a WSGI endpoint, run a background worker, or save the result of a scheduled Python command with a bounded timeout.
Start a Python web app
Open Python 호스팅 and choose Python 웹 앱. Download the Python HTTP example and upload its project to Files. Set MAIN_FILE → main.py, start the deployment, and copy the HTTPS address from Settings.
Open the address in a browser. The example’s home page links to /api/health. Open that link and check the response below. This exercises the WSGI application and its public route together.
{"service": "python-web", "status": "ok"}Start a framework project
Keep requirements.txt at the project root and include your chosen server dependency. The sample uses a small standard-library server for its demonstration. For an ASGI application named app in main.py with Uvicorn in its requirements, set RUN_COMMAND to the following command. Adjust the module and object names to match your project.
python -m pip install -r requirements.txt && python -m uvicorn main:app --host 0.0.0.0 --port "$SERVER_PORT"사용할 값은 Variables for credentials 및 Deploy for a connected branch. After a code change, check Console for import errors and request a route that exercises the changed code.
Observe a background process
이 상시 실행 워커 profile suits a process that continuously consumes work. Upload the worker example, start main.py and watch Console for a timestamped heartbeat each minute. Use flush=True on progress messages when you need them to appear immediately.
Run a finite script once or on an interval
Choose 일회성 Python 스크립트 for a manual task or 예약 Python 스크립트 for recurring work. The job example writes a JSON report and exits. Upload it at the root. Start the runner and select 지금 실행 in Runs. Check the exit result and the finished timestamp.
On the scheduled profile, set JOB_INTERVAL_SECONDS → 3600 for an hourly UTC interval. Set JOB_TIMEOUT_SECONDS to a suitable limit, save and restart. Runs shows the next occurrence and recent outcomes. A value of 0 for the interval pauses the schedule. See handling missed and overlapping runs before relying on a recurring report.