Phemeral
Reference

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

FrameworkAutodetectedSupportedServerProtocol
FastAPIYesYesuvicornASGI
FlaskYesYesgunicornWSGI
DjangoYesYesuvicornASGI
LitestarNoYesuvicornASGI
StarletteNoYesuvicornASGI
SanicNoYesuvicornASGI
FastHTMLNoYesuvicornASGI

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:

  1. uv.lock
  2. poetry.lock
  3. pyproject.toml
  4. requirements.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:

  1. A .python-version file in the project root.
  2. A .python-version file anywhere else in the repository.
  3. The lower bound of project.requires-python in pyproject.toml, read as major.minor. Only >=, ~=, and == establish a bound; a specifier with only an upper bound is ignored.
  4. Falls back to Python 3.12 when no version is specified.

The .python-version file should contain a version number. For example:

3.11

Runtime 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:

  1. If the project has a saved custom start command, Phemeral uses that command.
  2. 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 0

Custom start commands should also bind your application to port 8000.