Knowledgebase: PHP / Programming
How to Create Python Application
Posted by Tony B., Last modified by Brian F. on 29 June 2021 07:03 PM

We support the ability to deploy Python Applications utilizing mod_passenger through our cPanel page using our "Setup Python App" interface. You can find this interface by logging in to your accounts cPanel and use the search to look for "Python":



From the select Python interface in cPanel you have the ability to use any of the following Python versions:

  • Python 2.7
  • Python 3.3
  • Python 3.4
  • Python 3.5
  • Python 3.6
  • Python 3.7
  • Python 3.8

In addition to creating a new Python application our interface also allows you to:

  • Utilize Environment Variables. These can be added when deploying your app or they can be added later through the same interface.
  • The ability to start/stop/restart your app.
  • Configuration Files can be managed for existing application through a UI instead of relying on CLI.
  • Instead of managing modules individually, all required modules for an application can be installed by specifying the proper requirements files and triggering an installation action via the UI

To properly deploy your Python application you will need first need to select the "Create Application" button from the middle-right of the Python page:




  1. Start by choosing your desired Python version.

  2. You will then need to select an Application Root directory. The Application Root directory is preferably within your domains home directory and this is where you will upload your application files. For purposes of our example we'll use the directory /home/username/public_html/python for our Application Root

  3. Your Application URL should be the publicly accessible URL which corresponds to your Application Root from step 2.

  4. You can leave the Application Startup File and Application Entry Point fields empty unless you have reason to explicitly set them for your application. The Passenger Log File will be pointed at your home directory by default.

  5. Click "Create" once you have finished filling out the fields. Your application will be created:


Once the above steps have been completed you will see the application listed under the Web Applications table:

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).