Documentation navigation
Anybuild documentation

Python

Python, Django, FastAPI, Flask, ASGI, WSGI, and dependency-aware runtimes.

Detection

Python is detected from pyproject.toml, requirements.txt, manage.py, Python-oriented start commands, or a discovered Python main file. MkDocs is evaluated first and receives its own static-site provider.

Supported frameworks

Framework and server are detected independently. Anybuild supports the following Python frameworks and derives the appropriate ASGI or WSGI application import when applicable.

FrameworkConfig valuePrimary detectionDefault runner
Djangodjangodjango dependency with manage.pyUvicorn
Streamlitstreamlitstreamlit dependencyStreamlit CLI
FastAPIfastapifastapi dependencyUvicorn
Flaskflaskflask dependencyUvicorn
FastHTMLpython-fasthtmlpython-fasthtml dependencyUvicorn
MCPmcpmcp or mcp[cli] dependencyMCP CLI or the application itself

Set ANYBUILD_PYTHON_FRAMEWORK to the config value to override automatic detection.

Supported servers

Anybuild recognizes these application servers from project dependencies. When no server is declared, Django, FastAPI, Flask, and FastHTML default to Uvicorn.

ServerConfig valuePrimary detectionApplication type
Uvicornuvicornuvicorn dependency or framework defaultASGI or WSGI
Hypercornhypercornhypercorn dependencyASGI
Daphnedaphnedaphne dependencyASGI

Set ANYBUILD_PYTHON_SERVER to the config value to override automatic detection.

Dependencies

Python installs are driven by uv and the discovered pyproject/requirements context. Referenced requirement and constraint files are included. Optional ffmpeg and pandoc dependencies become explicit plan packages when detected or configured.

Common configuration

VariablePurposeExample value
ANYBUILD_PYTHON_VERSIONPython package version; current default is 3.13.3.13
ANYBUILD_PYTHON_FRAMEWORKForce a supported framework.fastapi
ANYBUILD_PYTHON_SERVERForce a supported application server.uvicorn
ANYBUILD_ASGI_APPLICATIONSet the ASGI import path.main:app
ANYBUILD_WSGI_APPLICATIONSet the WSGI import path.app:app
ANYBUILD_PYTHON_PRECOMPILEControl bytecode precompilation.true
ANYBUILD_PYTHON_EXTRA_DEPENDENCIESJSON array of additional packages.["orjson"]