The Python preset provides Python with pip and a virtual environment, managed by a systemd service.Documentation Index
Fetch the complete documentation index at: https://docs.instapods.com/llms.txt
Use this file to discover all available pages before exploring further.
Available Versions
| Version | Status |
|---|---|
| Python 3.11 | Supported |
| Python 3.12 | Default |
What’s Included
| Component | Version | Details |
|---|---|---|
| Python | 3.11 or 3.12 (your choice) | Python runtime |
| pip | Bundled | Package manager |
| venv | Built-in | Virtual environment (auto-created) |
| systemd | — | Process manager (app service) |
| git | Latest | Version control |
| SSH | OpenSSH | Access via dedicated port |
Directory Structure
- App Root:
/home/instapod/app - App Port: 8000 (your app must listen on this port)
- Virtual environment:
/home/instapod/app/venv
How the App Service Works
Your Python app runs as a systemd service calledapp. It:
- Runs
/home/instapod/app/venv/bin/python app.pyfrom the app directory - Starts automatically on boot
- Restarts on crash (
on-failurepolicy) - Logs to the system journal
- Runs as the
instapoduser
Virtual Environment
A Python virtual environment is automatically created at/home/instapod/app/venv when the pod is provisioned. It is also auto-activated on SSH and terminal login — you can use pip directly without activating it manually.
Deploying Your App
Upload and Reload
Example Flask App
Example FastAPI App
Gunicorn Auto-Detection
Ifgunicorn is installed in your virtual environment (listed in requirements.txt), pods reload automatically configures the systemd service to use gunicorn instead of python app.py:
wsgi.py file exists in your app directory, it uses wsgi:app as the module instead. This works out of the box for Django projects.
Viewing Logs
Adding a Database
Database services require the Build plan or higher.
Use Cases
- Django applications
- Flask / FastAPI APIs
- Data science dashboards (Streamlit, Dash)
- Machine learning model serving
- Python scripts and automation