Python web applications

Please first read our documentation about webshares.

We allow to host Python 3.9 web applications using WSGI, which is enabled on demand only (please contact us).

Basic usage

  • WSGI app directory: /home/wwwshare/public
  • WSGI entry point: /home/wwwshare/public/wwwshare.wsgi

All new WSGI webshares will come with a dummy app in wwwshare.wsgi. Edit this file to load your application.

If you make changes to the source code, you have to tell the webserver to restart the WSGI app by modifying the file time stamp on the WSGI entry point:

touch /home/wwwshare/public/wwwshare.wsgi

Static content

If your app hosts static content, please inform us about the relative path(s) to the location(s) in /home/wwwshare/public, that contains static content.

Virtual environment

Our WSGI uses a virtual environment (venv), which contains any custom python packages and is activated by our webserver configuration.

  • Location: /home/wwwshare/private/venv
  • Requirements: /home/wwwshare/private/requirements.txt
  • Freeze: /home/wwwshare/private/freeze.txt

If your app needs custom python packages, please specify them in the requirements file. We will have to generate a new venv should there be any changes, so please contact us in that case.

In the future we might provide a way for you to re-generate the venv yourself. But this should not be needed often, since development should happen on your local machine and your app should only be deployed to our server once it is stable.

The freeze file will be automatically generated and contains all package versions installed in the venv. It is needed to reproducibly re-generate the exact state of the venv later, please do not modify this file.