Supported versions
You can select the major and minor version. Patch versions are applied periodically for bug fixes and the like. When you deploy your app, you always get the latest available patches.- 3.14
- 3.13
Specify the language
To use Python, specifypython 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.- 3.12
- 3.11
- 3.10
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.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:- Specify one of the supported versions:
- Install the requirements for your app.
- Define the command to start your web server:
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:
Replaceconfig/uwsgi.ini
app.pywith 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 thedependencies 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.- ClickHouse
- Elasticsearch
- Gotenberg
- Headless Chrome
- InfluxDB
- Kafka
- MariaDB/MySQL
- Memcached
- mercure
- mongodb
- Network Storage
- OpenSearch
- PostgreSQL
- RabbitMQ
- Redis
- Solr
- Valkey
- Varnish
- Vault KMS
- Chroma
- Qdrant