The Python platform uses python 3.11.3 by default and get your dependencies
with pip, either by Pipfile.lock, requirements.txt or setup.py.
You can define which python version you want using .python-version, always
use full versions.
ex:
3.11.3
Available python versions:
when adding new releases, we will retain previous version on the series to allow time for users update their apps. e,g: when 3.6.3 is released, we will remove 3.6.1.
By default, the latest pip version will be installed. If you want to use a
specific version, set a PYTHON_PIP_VERSION environment variable. It accepts
a specific version (PYTHON_PIP_VERSION=7.1.2) or a
requirement specifier
(PYTHON_PIP_VERSION="<10").
If you just run a tsuru app deploy of your code, tsuru will try to download
all of your depencies using requirements.txt or setup script. You can
customize this behavior, see the next section for more details.
There are two ways to list the applications dependencies: requirements.txt
or setup.py. The priority order is: requirements -> setup. The file should
be in the root of deploy files.
If you have a Pipfile.lock file, tsuru will use pipenv to install the
dependencies of your application.
You can define a file called requirements.txt that list all pip
dependencies of your application, each line represents one dependency, here's
an example:
$ cat requirements.txt
Flask==0.10.1
gunicorn==19.3.0
You can also define the setup script to list your dependencies, here's an example:
$ cat setup.py
from setuptools import setup, find_packages
setup(
name="app-name",
packages=find_packages(),
description="example",
include_package_data=True,
install_requires=[
"Flask==0.10.1",
"gunicorn==19.3.0",
],
)
After invoking tsuru app-deploy, tsuru will receive your code and tell the
platform to install all the dependencies using pipenv install --system --deploy, pip install -r requirements.txt or pip instal -e ./.
Content type
Image
Digest
sha256:c4680bf83…
Size
159.1 MB
Last updated
3 months ago
docker pull tsuru/python