Skip to content

yaoelvon/How-to-create-a-separate-config-file-with-flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

First create a config.cfg file. Contents:

HELLO='Hi!'

Then in your main python file for flusk (where you run everything):

app = Flask(__name__)

app.config.from_pyfile('config.cfg')

# And use it like so:
app.config['HELLO']

log: 2016/04/13 add app.config.from_envvar()

About

How to create a separate config file with flask

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages