Example applications for Flask beginners.
First, you need to clone this repository:
git clone [email protected]:greyli/flask-examples.gitOr:
git clone https://github.com/helloflask/flask-examples.gitThen change into the flask-examples folder:
cd flask-examplesNow, 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.txtBefore 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 runSimilarly, you can run HTTP application like this:
cd http
flask runThe applications will always running on http://localhost:5000.
- Hello (
/hello): Say hello with Flask. - HTTP (
/http): HTTP handing in Flask. - Templates (
/templates): Templating with Flask and Jinja2. - Form (
/form): Form handing with Flask-WTF (WTForms), File upload and integrating with Flask-CKEditor, Flask-Dropzone. - Database (
/database): Database with Flask-SQLAlchemy (SQLAlchemy). - Email (
/email): Email with Flask-Mail, SendGrid - Assets (
/assets): Assets profiling with Flask-Assets. - Cache (
/cache): Cache with Flask-Caching.
- SayHello: A simple message board.
- Bluelog: A blog engine that supports category and resource management.
- Albumy: A full-featured photo-sharing social networking.
- Todoism: A to-do application implements as SPA, it supports i18n and provides web APIs.
- CatChat: A chat room based on WebSocket.
Any contribution is welcome, just fork and submit your PR.
This project is licensed under the MIT License (see the LICENSE file for details).