Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Outline

Python Web Applications: Deploy Your Script as a Flask App

Code snippets supplementing the Python Web Applications: Deploy Your Script as a Flask App tutorial.

Running Locally

Create and activate a Python virtual environment:

$ python -m venv venv
$ source venv/bin/activate

Update pip and install the required dependencies:

(venv) $ pip install -U pip
(venv) $ pip install -r requirements.txt

Start the Flask server:

(venv) $ python main.py
 * Serving Flask app "main" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Running on http://127.0.0.1:8080/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 339-986-221

Navigate your web browser to this address: http://127.0.0.1:8080/

Morty Proxy This is a proxified and sanitized view of the page, visit original site.