Skip to content

b1r3k/flask-seed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flask-seed

Skeleton for flask based web applications.

Features

  • integrated blueprint
  • config with production / development environment management
  • template for e2e & unittest tests
  • ready configuration files for launching via:
    • FastCGI
    • gunicorn

Dependencies

  • foreman
  • gunicorn (optional)
  • flask-restful (req. by REST API blueprint)
  • flup (optional, req. by Fast-CGI, eg. bluehost shared hosting)

Usage

  1. Clone
  2. install virtual env
  3. pip install -r requirements.txt
  4. foreman start

Adjusting development environment

  1. config/config.py defines different config objects default containging settings for the app.
    • for development environment use config.Dev object
  2. If you want to select config setup, without code modification you can set CONFIG variable with class name defined in config/config.py
  3. Config object can be overriden by specifing path to config via environmental variable FLASK_SEED_CONFIG
    • Foreman can do this job, just set the variable in the .env file

Logging

  • based on logbook
  • setup globally for application.
  • see flaskApp/main.py and flaskApp/blueprints/restapi/HelloWorld.py for usage examples
  • default setup directs logs to stderr and file, see utils/logger.py for setup details

About

Skeleton for flask based web applications.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published