Python Builds

The Python buildpack detects if your build is Python by looking for a requirements.txt file. If found, dependencies will be installed using pip.

Please include a Procfile in the root folder of your repository. If no Procfile is found, your deploy might fail to start with the following error.

The default Python version is 3.6.

You can customize the Python version by adding a runtime.txt file to the root of your project. The contents of the file should include the version. For example,

Hosting Django

When serving Django, you need to set the IP to, any other IP will most likely return an error when initiating the runserver command.

Sample Flask Python Procfile

Railway uses Procfiles to determine the start command of your application. Flask is a popular choice for web servers on Railway.

Edit this file on GitHub