Skip to content

Prepare a Python web application

Configure the runtime and WSGI entry point using information from your developer.

Where Tools → Software → Setup Python App → Create application

Before you start

  • Have the application files, compatible Python version and WSGI startup details.
  • Do not accept an obsolete default runtime just because it is preselected.

Steps

  1. 1

    Choose a maintained, compatible Python version. Enter the Application root folder where the code will live.

  2. 2

    Select the domain and URL path under Application URL. Check you are not replacing another live application.

  3. 3

    Add required environment variables privately. Review the form before Create, then follow the application’s dependency/virtual-environment instructions using the generated environment.

  4. 4

    Start or restart the application when ready and inspect logs if it fails. A local development server command is not necessarily the correct production WSGI configuration.

  5. 5

    Open Setup Python App and click Create application.

    Open Create application from the Python application list.
  6. 6

    Enter Application startup file and Application Entry point exactly as specified by the developer. The entry point is the WSGI callable name, not the public website address.

    Application startup file and Entry point must match the actual Python app.

Check it worked

  • The intended URL serves the application successfully.
  • The correct virtual environment contains the required dependencies.