Supported Frameworks
Python frameworks and package managers that Phemeral detects and deploys automatically.
Phemeral automatically detects your Python framework and package manager from your source code. No configuration files are required because Phemeral analyzes your project structure and code to determine how to build and run your application.
Framework Support
| Framework | Autodetected | Supported | Server | Protocol |
|---|---|---|---|---|
| FastAPI | Yes | Yes | uvicorn | ASGI |
| Flask | Yes | Yes | gunicorn | WSGI |
| Django | Yes | Yes | uvicorn | ASGI |
| Litestar | No | Yes | uvicorn | ASGI |
| Starlette | No | Yes | uvicorn | ASGI |
| Sanic | No | Yes | uvicorn | ASGI |
| FastHTML | No | Yes | uvicorn | ASGI |
Package Managers
| Package Manager |
|---|
| uv |
| poetry |
| pip (pyproject.toml) |
| pip (requirements.txt) |
Detection Priority
Phemeral searches for dependency files in this order and uses the first match:
uv.lockpoetry.lockpyproject.tomlrequirements.txt
The search finds the dependency file closest to the root of your repository (shallowest directory depth). This file's location also determines the project root, which is the directory that Phemeral treats as the working directory for your application.
Setting a custom root directory overrides this: the search starts from the directory you name instead of the repository root.
Python Version
Phemeral resolves the Python version in this order:
- A
.python-versionfile in the project root. - A
.python-versionfile anywhere else in the repository. - The lower bound of
project.requires-pythoninpyproject.toml, read asmajor.minor. Only>=,~=, and==establish a bound; a specifier with only an upper bound is ignored. - Falls back to Python 3.12 when no version is specified.
The .python-version file should contain a version number. For example:
3.11Runtime Servers
Based on your framework's protocol:
- ASGI (e.g., FastAPI, Django): Your application is started with uvicorn on port 8000.
- WSGI (e.g., Flask): Your application is started with gunicorn on port 8000.
Runtime Command Selection
Phemeral chooses the runtime command for each new deployment in this order:
- If the project has a saved custom start command, Phemeral uses that command.
- Otherwise, Phemeral uses the autodetected default command for the framework.
You can set or clear the custom command from the project's Settings tab. Saving an empty value returns the project to autodetection. See Set a Custom Start Command.
The autodetected command follows this pattern:
# ASGI (FastAPI, Django)
uvicorn {module}:{object} --host 0.0.0.0 --port 8000
# WSGI (Flask)
gunicorn {module}:{object} --bind 0.0.0.0:8000 --timeout 0Custom start commands should also bind your application to port 8000.