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

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

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

    return result