Developing Flask apps on Reclaim Cloud

Difficulty: Advanced

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.

Getting Started

You can find our Flask installer by clicking on the Marketplace and navigating to the Dev & Admin Tools category or searching by name.

Screen Shot 2020-07-12 at 9.13.45 AM|480x144

mceclip2.png

Installing is as easy as setting an environment name and region for the install.

mceclip3.png

mceclip5.png

Once the installation is complete, you can click Open in Browser to check if the installation went smoothly:

mceclip7.png

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:

wsgi.py

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.

hello.py

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.

requirements.txt

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.

Further information

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.

 

 

Was this article helpful?
0 out of 0 found this helpful

Articles in this section

See more
Reclaim Hosting Support Hours
8:00 am - 5:00 pm ET, Monday through Friday
Submit a Ticket
Get a quick and helpful response from the pros.
Need Extra Support?
No problem, we're here to help! Talk to us about Professional Services.