Link

You have many choices on how to deploy your application to the web. You can rent a virtual machine from AWS, Google Cloud or Digital Ocean.

Haverford and Bryn Mawr students can use sites.haverford or digital.brynmawr. Here are instruction to deploy a Flask app there: http://bit.ly/flask-deploy

Heroku is a popular tool for deploying Python applications. here is a tutorial on how to deploy your app using Heroku

If your app is primarily used for content publishing or if the appication’s processing takes place in the browser, you can easily “freeze” your app. Frozen-Flask creates a static version of your app and all its contents. You can then deploy them GitHub pages or Netify. This is free and there are other advantages to “minimal computing,” which Alex Gil outlines here. In industry, this approach to deployment is often called a JAMstack

Frozen-Flask $ pip install Frozen-Flask

freeze.py

import csv
from flask_frozen import Freezer
from app import app

freezer = Freezer(app)

with open('courses.csv','r') as f:
    reader = csv.DictReader(f) 
    info = ""
    departments = []
    for row in reader:
        departments.append(row['department'])

@freezer.register_generator
def by_subject():
    for department in departments:
        if department == 'Latin American, Iberian and Latina/o Studies':
            pass
        else:
            yield {'department': department}


if __name__ == '__main__':
    freezer.freeze()

source