helloflask / flask-examples

Example applications for Flask learners.
http://helloflask.com/en/
MIT License
189 stars 106 forks source link
examples flask python tutorial web

Flask Examples

Example applications for Flask beginners.

Installation

First, you need to clone this repository:

git clone git@github.com:greyli/flask-examples.git

Or:

git clone https://github.com/helloflask/flask-examples.git

Then change into the flask-examples folder:

cd flask-examples

Now, we will need to create a virtual environment and install all the dependencies:

python3 -m venv venv  # on Windows, use "python -m venv venv" instead
. venv/bin/activate   # on Windows, use "venv\Scripts\activate" instead
pip install -r requirements.txt

How to Run a Specific Example Application?

Before run a specific example application, make sure you have activated the virtual enviroment.

For example, if you want to run the Hello application, just execute these commands:

cd hello
flask run

Similarly, you can run HTTP application like this:

cd http
flask run

The applications will always running on http://localhost:5000.

Example Applications Menu

Advanced Examples Flask Applications

Contributions

Any contribution is welcome, just fork and submit your PR.

License

This project is licensed under the MIT License (see the LICENSE file for details).