Python Quick Start on Varity
Deploy an existing Python web app to Varity in one command. Varity detects your framework (FastAPI, Django, or Flask), provisions any backend services your app needs, and deploys it. You do not change your code.
Prerequisites
Section titled “Prerequisites”- Python 3.11+ (for your app and the CLI)
- A FastAPI, Django, or Flask project
Deploy your app
Section titled “Deploy your app”-
Install the CLI
Terminal window pipx install varitykit -
Open your project
Terminal window cd my-api -
Confirm it runs locally (optional)
Terminal window uvicorn main:app --reloadTerminal window python manage.py runserverTerminal window flask run -
Deploy to Varity
Terminal window varitykit app deployVarity detects your framework, builds your app, and deploys it as a dynamic runtime.
-
Your app is live
The terminal shows your live URL. Python web apps run as a dynamic runtime, so they’re served on their own subdomain:
https://<app-name>.varity.app/
What gets auto-wired
Section titled “What gets auto-wired”You do not import an SDK or change your code. When Varity deploys a Python app, it configures the backend automatically:
- Databases and caches: if Varity detects a database client in your dependencies (for example
psycopg,SQLAlchemy,pymongo,redis, ormysqlclient), it provisions the matching service and injects the connection details into your app’s environment at runtime (DATABASE_URL,REDIS_URL,MONGODB_URI,MYSQL_URL). - Environment variables: any variables you set are injected into the deployed container. See Environment Variables.
- Live URL:
https://<app-name>.varity.app/, with HTTPS handled for you.
For the full list of detected frameworks and auto-wired services, see Supported Frameworks and Auto-wired Services.
Next Steps
Section titled “Next Steps”- Supported Frameworks: Everything Varity can detect and deploy
- Auto-wired Services: How databases and caches are provisioned
- Databases & Data: Durability expectations in beta
- Deploy your app: Full deploy reference