Skip to content

This is an example python project using Flask blueprints but having the blueprint files use classes

Notifications You must be signed in to change notification settings

dacoburn/example-flask-blueprints

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

example-flask-blueprints

Description

This is a very simple Python Flask example that is using Flask Blueprints with classes. The advantage of doing this is it makes it easier to pass arguments to your "blueprint" and keep your main app.py code much cleaner. Also, for someone coming in later it is much easier to read and understand.

This example also uses some simple template formats for pulling the passed variables to the blueprint classes.

Pre-Reqs

Prior to running you need to install the Flask python module. That should be the only requirements for the example.

pip install -r requirements.txt

Usage

Run:

export APP_PORT=5001
python main.py

Then in your browser you can access the pages by going to http://localhost:5001

About

This is an example python project using Flask blueprints but having the blueprint files use classes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published