1
0
mirror of https://github.com/balkian/bitter.git synced 2025-07-09 06:52:21 +00:00
bitter/bitter/config.py
J. Fernando Sánchez 9c82dea298 Config from variable or file
This replaces the old file of credentials (with one per line) with a
configuration in YAML format.

The configuration can be stored either in a file or in an environment variable
(BITTER_CONFIG).

There is still a command line argument to add the credentials in that file to
the config.
2017-12-19 20:34:39 +01:00

15 lines
401 B
Python

'''
Common configuration for other modules.
It is not elegant, but it works with flask and the oauth decorators.
Using this module allows you to change the config before loading any other module.
E.g.:
import bitter.config as c
c.CREDENTIALS="/tmp/credentials"
from bitter.webserver import app
app.run()
'''
CREDENTIALS = '~/.bitter-credentials.json'
CONFIG_FILE = '~/.bitter.yaml'