Skip to main content

Deploy SandBox Python Apps

How to deploy Python apps on eenos ?

This document will help you to deploy a python app on your eenos hosting control panel.  Eenos control panel is a modern hosting control panel designed for modern apps. 

Features Of Eenos Python App Management

Eenso control panel have the following wonderful features for easily managing python apps

  • Manage unlimited python app domains or subdomains
  • Python Version Selector 
  • Deploy Django  with one click
  • Deploy Wagtail with one clikc
  • Deploy Flask app
  • Deploy any Python uWsgi app

Every eenos python  app have its on virtual environment.  So migration and transfer of  hosting accounts are easy

To start deploying python app logins to your eenos control panel and go to the following Page:

Python -> Python SandBox Apps

Setup Python SandBox and Install Apps

Now you need to fill the simple form  as follows,

Chose Domain For Python App : Select a domain or  subdomain  for deploying a python app. This  is the website  url you are going to deploy the app.

Chose Python Version : Select a suitable version of python distribution to setup the Sandbox virtual environment

Chose Python App : Select what type of python app are you hosting.   Based on this selection may need to  configure the app specific setting too .

App Startup Script : The  startup entry script name. It is normally a wsgi script  ( eg : wsgi.py ) 

Public Folder Name: This is the folder into which you upload the static files  like css, js, images etc. It is directly under your website document root

Project Publicity Type : This option will help you  to setup the project  in either production or development mode.

Install Demo App : If you wish to install the selected demo app.  You have already developed the app, you can select no and upload the files yourself.

Now Click  the button  Deploy App and it will start deploying the app.

Mange Python App From Shell

If your hosting account have enabled ssh access. You can easily manage your python app from the shell too. You may contact your hosting server and enable the ssh shell access to access this feature. 

You can login to the server with the ssh client from your desktop.

Here we are going to use the following details to show you how to manage Python app from eenos sever shell virtual environment. 

 Example eenso user :  myuser

Example python  app domain : django.mydomain.com

Example  eenos ssh sever port  : 22

Login to SSH terminal

Login to the ssh sever with the following command ,

ssh myuser@django.mydomain.com -p 22

Activate Python  Virtual Environment

Activate the Virtual Sandbox  Python environment for the domain django.mydomain.com as follows,

myuser:$ ~ $ source  ~/.sandbox/python/django.mydomain.com/bin/activate
(django.mydomain.com) myuser:$ ~ $

Done, you are on the domains python environment , you can start working on your python app from the terminal 

See some  example command below,

Check python version for the domain,

(django.mydomain.com) myuser@:$ ~ $ python -V
Python 3.8.12
(django.mydomain.com) myuser@:$ ~ $ 

Run PIP command on the domain as follows,

(django.mydomain.com) myuser@:$ ~ $ pip list
Package             Version
------------------- ---------
anyascii            0.3.0
asgiref             3.5.0
backports.zoneinfo  0.2.1
beautifulsoup4      4.9.3
certifi             2021.10.8
charset-normalizer  2.0.12
click               8.0.4
Django              4.0.3
django-filter       21.1
django-modelcluster 5.2
django-taggit       2.1.0
django-treebeard    4.5.1
djangorestframework 3.13.1
draftjs-exporter    2.1.7
et-xmlfile          1.1.0
Flask               2.0.3
html5lib            1.1
idna                3.3
itsdangerous        2.1.1
Jinja2              3.0.3
l18n                2021.3
MarkupSafe          2.1.0
mysqlclient         2.1.0
openpyxl            3.0.9
Pillow              9.0.1
pip                 21.3.1
psycopg             3.0.9
psycopg2            2.9.3
pymongo             4.0.2
pytz                2021.3
requests            2.27.1
setuptools          58.3.0
six                 1.16.0
soupsieve           2.3.1
sqlparse            0.4.2
tablib              3.2.0
telepath            0.2
urllib3             1.26.8
uWSGI               2.0.20
wagtail             2.16.1
webencodings        0.5.1
Werkzeug            2.0.3
wheel               0.37.0
Willow              1.4.1
xlrd                2.0.1
XlsxWriter          3.0.3
xlwt                1.3.0
(django.mydomain.com) myuser@:$ ~ $ 

Deactivate  Python Virtual Environment

You can deactivate the current working python shell virtual environment use the following command

(django.mydomain.com) myuser@:$ ~ $ deactivate 
myuser@:$ ~ $ 

This command will return your to the default terminal. Now you can switch to another python app from the same terminal

Switch Python SandBox Virtual Environment

Let us say we have Flask app on the  domain flask.mydomain.com on the same same eenos hosting account, we can switch to the virtual environment for the flask app as follows,

With the above steps you can start deploying python apps.  The next session will help you to manage python pip modules from the eenos control panel