Welcome, Guest Login

Public Cloud Center

Getting Started With Python

Last Updated: Apr 19, 2017 10:02AM EDT

Xervo supports the seamless deployment of Python applications. The Python runtime supports multiple version of Python and serves static content using a configurable nginx front-end.


Creating a Python project can be done by choosing Python on the web portal or when creating a project using the CLI.


Deploying a Python application is done by simply deploying the directory containing your Python source code. Xervo will install your pip dependencies from requirements.txt.

$ cd path/to/project
$ Xervo deploy


Xervo pre-installs Python versions 2.5.6, 2.6.9, 2.7.10, 3.2.6, 3.3.6, and 3.4.3. You can change the version of Python by deploying an application manifest file (app.json) in the root of your project or by including .python-version file in the root directory. You can set the version to any version (even those not listed), but versions not listed above will require the Python version to be installed prior to deploying, which may delay your deploy. If no version is specified, the project will default to 2.7.10.

  "engines": {
    "python": "2.7.10"


Xervo provides a reasonable base nginx and site configuration that will serve static assets for Python applications. You can provide your own site-specific nginx configuration by deploying a "sites-enabled" folder with configuration files in the root of your project. All config files located in this folder will be included by nginx.


Django is the default method for running a Python application. Django applications are run using gunicorn with an nginx proxy that also serves static assets. Static assets are expected to be located in a directory named static.

The run image automatically calls migrate (./manage.py migrate) for you.

Django applications are started by running gunicorn -b unix:/mnt/home/app.sock wsgi - you may provide your own start command by adding a start script to app.json. Note that your start command must bind to the socket at /mnt/home/app.sock unless you provide custom nginx configuration that handles proxying to your application.

Overriding the start command in app.json

  "scripts": {
    "start": "gunicorn -b unix:/mnt/home/app.sock wsgi"

Contact Us

    Our Support Policy
    Submit a Support Request

  • Public Cloud Support Hours
    9am-5pm EST Mon-Fri
    Outside of these hours response times may be up to 24hrs.

    Submit a support ticket by clicking 'status and support' icon on the left side of this page.

seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found