Python Cloud Environment Hosting

Cantech Cloud PaaS provides an out-of-box integration of the scalable Apache application server dedicated specially for the Python-based applications hosting. It is already optimized and prepared for immediate management, allowing to dive right into development without bothering about numerous orchestration tasks, i.e. making the hosting process maximally convenient for developers.

To start hosting your Python application at Cantech PaaS, you need to create the appropriate environment via the powerful topology wizard (accessible through the New Environment button at the dashboard’s top panel). Switch to the Python language tab and select the desired engine version. Apache Python application server is automatically added in a bundle with the mod_wsgi module. Specify resource limits and nodes’ count, as well as add extra software stacks or options (e.g. Public IPs) if required.

Step 1:- Create a new environment then after select the Nord.js

Currently (at the time of this writing), the following Python versions are supported:

  • 3.6.15
  • 3.7.12
  • 3.8.12
  • 3.9.10
  • 3.10.2

You can select the required version of Python directly from the topology wizard during the creation of a new environment, as well as adjust it for already existing ones using container redeployment.

Then After click to create a environment.

Deploy Python Project Via Archive URL

In order to successfully deploy and run a Python application, some additional modules or other packages may be required to be installed. It is a common practice to run Python web applications in isolated virtual environments, for example using the virtual environment tool, which allows managing projects independently and without the administrator privileges.

1. Connect to the Python environment via SSH (using either a local or built-in Web SSH client) to create and start a new virtual environment. Run the following commands:

1.virtualenv {appName} 
2.source {appName}/bin/activate

2. The management of the required software packages is commonly provided by pip – a popular Python package management system for the PiPI repository. Below, some of the most common commands are listed:

  • pip install {packageName} – installs a necessary module
  • pip uninstall {packageName} – removes previously installed module
  • pip install -upgrade {packageName} – updates the specified module to its latest version
  • pip install -r requirements.txt – installs all the modules, listed in the requirements.txt file
  • pip list – shows the set of already installed modules
Note: In the case of the preconfigured application packages (archives), all the dependencies 
are provided via the requirements.txt file, which is read during the deployment process to 
install the listed Python modules automatically. Also, it should contain the wsgi.py file 
with the entry point script for running an application inside a virtual environment using 
the mod_wsgi for Apache

 

 

If you need any help contact our support, Open support ticket from client area.

Was this article helpful?

Related Articles