1 min to read
Netcup and flask
Netcup is a provider which gives you python’s wsgi capabilities at a very low entry price, but provides basically no documentation, how to set it up.
Steps
As netcup internally runs the PhusionPassenger app server, we will use the passenger-python-flask-demo as a starting point.
1. Basic setup
Login to your netcup server and clone the phusion example into “python” directory in root.
git clone https://github.com/phusion/passenger-python-flask-demo.git python
cd python
2. Dependencies
Create a virtual environment on your development maschine and install flask.
mkdir flask_project
cd flask_project
python3 -m venv venv
. venv/bin/activate
pip install flask
Copy flask and its dependencies to the “python” folder on your netcup server. You can find the files in your “venv” folder on your development maschine. The python folder should look like this now:
bash-4.3$ ls -l python/
total 48
Mar 19 17:05 app.py
Mar 19 17:09 click
Mar 19 17:09 flask
Mar 19 17:09 itsdangerous
Mar 19 17:09 jinja2
Mar 19 17:09 markupsafe
Mar 18 17:11 passenger_wsgi.py
Mar 18 17:11 templates
Mar 19 17:09 werkzeug
3. Start the app
Login to your WCP and enable python. Point the application root to “/python” and the passenger file to “passenger_wsgi.py”. After reloading the application, you are able to test the installtion. My running wsgi can be found here.