You can now use composable image to install runtimes and tools in your application container. To find out more, see the
Composable image topic.
Python is a general purpose scripting language often used in web development.
You can deploy Python apps on Upsun Cloud using a server or a project such as uWSGI.
Supported versions
You can select the major and minor version.
Patch versions are applied periodically for bug fixes and other maintenance updates. By default, you get the latest available patches each time you deploy. If your project has a maintenance window configured, Upsun Cloud applies patches only during that window. Upsun Cloud may still apply urgent or critical fixes outside of the maintenance window.
Specify the language
To use Python, specify python as your app’s type:
For example:
Deprecated versions
The following versions are still available in your projects,
but they’re at their end of life and are no longer receiving security updates from upstream.
To ensure your project remains stable in the future, switch to a supported version.
* This version doesn’t receive any updates at all.
You are strongly recommended to upgrade to a supported version.
Retired versions
The following versions have been retired and are no longer available.
If your project uses a retired version, you must update to a supported version.
-
3.10
-
3.9
-
3.8
-
3.7
-
3.6
-
3.5
-
2.7
Usage example
Run your own server
You can define any server to handle requests.
Once you have it configured, add the following configuration to get it running on Upsun Cloud:
- Specify one of the supported versions:
- Install the requirements for your app.
- Define the command to start your web server:
You can choose from many web servers such as Daphne, Gunicorn, Hypercorn, and Uvicorn.
See more about running Python web servers.
Use uWSGI
You can also use uWSGI to manage your server.
Follow these steps to get your server started.
- Specify one of the supported versions:
- Define the conditions for your web server:
-
Create configuration for uWSGI such as the following:
Replace
app.py with whatever your file is.
-
Install the requirements for your app.
-
Define the entry point in your app:
Package management
Your app container comes with pip pre-installed.
For more about managing packages with pip, Pipenv, and Poetry,
see how to manage dependencies.
To add global dependencies (packages available as commands),
add them to the dependencies in your app configuration:
For example, to use pipenv to manage requirements and a virtual environment, add the following:
Connect to services
The following examples show how to access various services with Python.
For more information on configuring a given service, see the page for that service.
You can access service credentials to connect to managed services from environment variables present in the application container.
Consult each of the individual service documentation to see how to retrieve and surface credentials into your application.
Sanitizing data
By default, data is inherited automatically by each child environment from its parent.
If you need to sanitize data in preview environments for compliance,
see how to sanitize databases.
Frameworks
All major Python web frameworks can be deployed on Upsun Cloud.
See dedicated guides for deploying and working with them:
Last modified on October 23, 2026