Flask is a popular web application framework written in Python. You could get started with Flask on Reclaim Cloud by setting up a VPS and installing Python yourself, or by making a new Python hosting environment and configuring your wsgi.py file, but we created a quick start app in the Marketplace to make setting a Flask development environment up quick and easy.
You can find our Flask installer by clicking on the Marketplace and navigating to the Dev & Admin Tools category or searching by name.
Installing is as easy as setting an environment name and region for the install.
Once the installation is complete, you can click Open in Browser to check if the installation went smoothly:
How to use the environment
The document root for your flask environment is
/var/www/webroot/ROOT and this installer creates three files to get you started:
This file tells mod_wsgi where to find the application, in this case the hello.py file. This is based on the default wsgi.py that comes when you deploy a Python environment on Reclaim Cloud and Flask's mod_wsgi documentation.
This is a single file flask app that outputs "Hello, World!" to a webpage. This is similar to the one on Flask's Quickstart page.
This file tells Reclaim Cloud to install the flask module using pip upon deployment. You could also manually install packages listed in this file by running
pip install -r requirements.txt, or skip the file entirely and manually install flask by running
pip install flask.
If you are new to Flask you will likely want to check out the documentation on flask.palletsprojects.com, particularly their Quickstart guide and page on mod_wsgi. You can also find out more about Python hosting on Reclaim Cloud by checking out Virtuozzo's Python Dev Center.