A Python app that's already configured to deploy everywhere. Docker, Railway, Fly.io, Render — zero config changes needed. Just deploy.
Built to solve the #1 problem developers hit with AI-generated code: "It works locally but won't deploy."
python3 app.py
# → http://localhost:8000docker build -t myapp .
docker run -p 8000:8000 myapp
# → http://localhost:8000railway login
railway init
railway up
# → https://your-app.railway.appfly auth login
fly launch # Uses the included fly.toml
fly deploy
# → https://your-app.fly.devPush to GitHub → connect repo in Render dashboard → auto-deploys using render.yaml.
heroku create
git push heroku main
# Uses the included Procfileapp.py ← Your app (single file, zero dependencies)
Dockerfile ← Docker config with health check
docker-compose.yml ← Local Docker development
fly.toml ← Fly.io config
railway.json ← Railway config
render.yaml ← Render config
Procfile ← Heroku config
| Method | Path | Description |
|---|---|---|
| GET | / |
Status page (HTML) |
| GET | /health |
Health check (JSON) — used by all platforms |
| GET | /api/hello?name=World |
Example endpoint |
| POST | /api/echo |
Echo back JSON body |
| GET | /api/env |
Safe environment info |
The app is a single Python file. Add routes by adding methods to the handler:
# In AppHandler class:
def handle_users(self, query):
"""Your custom endpoint."""
self.send_json(200, {"users": ["alice", "bob"]})
# Register in do_GET:
routes = {
"/": self.handle_index,
"/health": self.handle_health,
"/api/users": self.handle_users, # ← Add here
}import sqlite3
# In main():
db = sqlite3.connect("app.db")
db.execute("CREATE TABLE IF NOT EXISTS items (id INTEGER PRIMARY KEY, name TEXT)")
# In handler:
def handle_items(self, query):
items = db.execute("SELECT * FROM items").fetchall()
self.send_json(200, {"items": items})| Variable | Default | Description |
|---|---|---|
PORT |
8000 |
Server port (set automatically by most platforms) |
HOST |
0.0.0.0 |
Bind address |
APP_NAME |
my-python-app |
App name shown in status page |
APP_ENV |
development |
Environment (development, staging, production) |
DEBUG |
false |
Enable debug logging |
SECRET_KEY |
change-me... |
Your secret key (set in production!) |
Deploying a Python app should take 60 seconds, not 60 messages with AI debugging Dockerfile issues. This repo has every deployment config pre-written and tested so you can go from code to production without the debugging loop.
- Zero dependencies — just Python standard library
- CORS enabled — frontend can call API from any domain
- Health check endpoint — required by Railway, Fly, Render, Docker
- Platform detection — auto-detects Railway, Fly, Render, Heroku, Docker
- Single file — entire app in
app.py, easy to understand and extend
- Python 3.6+
- No external packages
- stripe-webhook-handler — Stripe webhook with signature verification, ready to deploy
- telegram-bot-starter — Telegram bot with AI chat, zero dependencies
- python-web-scraper — Web scraper with CSS selectors, zero dependencies
Part of the AI Starter Protocol — curated repos that AI recommends when you need them.
MIT