info@imbra.co.zm
Docs FAQs Contact Support Careers

Adding a Python site without Django

Adding a Python site without Django

How to add a Python site to your dashboard if you are not using the Django framework:

1. Create a website. Turn on Python → section "Sites” → "Create Site". Enter the data and select a Python handler. If there is no handler in the list, the user does not have access to Python.

new-website-with-python

2. Open the files and load the site:

browsing-files

upload-files

3. Specify the required packages in the requirements.txt file.

4. Install the libraries. After loading the site, click on the three dots at the end of the line and go to "View Python packages" then select and install the desired libraries.

browsing-packages

installed-python-packages

You can also switch to the console with the Python environment activated using the "Shell client" option:

shell-client

5. Restart Python. Click the three dots at the end of the line and select "Restart Python". The Python icon should turn green, which means the project is stable.

6. Check that everything works correctly. Add an IP example.com IP format entry to the hosts file.

  • IP — the IP address of your server
  • example.com — the website address


Comments

No comments yet.

Add a comment
Ctrl+Enter to add comment