aboutsummaryrefslogtreecommitdiff
path: root/app/config.py
blob: fc37f36018db9b120cdd4ab1a3274a4379cd22c9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import toml

def load_config(path):
    contents = toml.load(path)

    result = {
            'SQLALCHEMY_DATABASE_URI': contents['database']['postgres_url'],
            'SECRET_KEY': contents['server']['secret_key'],
            'DEBUG': contents['server']['debug'],
            'SECURITY_REGISTERABLE': True,
            'SECURITY_PASSWORD_SALT': contents['server']['secret_key']
            }

    return result