blob: 29eb2efcc8f3e657939d2adb8136039d5d7eea46 (
plain) (
tree)
|
|
import toml
def load_config(path):
contents = toml.load(path)
result = {
'SQLALCHEMY_DATABASE_URI': contents['database']['postgres_url'],
'SECRET_KEY': contents['server']['secret_key'],
'MAIL_SERVER': contents['email']['smtp_server'],
'MAIL_PORT': contents['email']['smtp_port'],
'MAIL_USE_TLS': contents['email']['smtp_tls'],
'SECURITY_REGISTERABLE': True,
'SECURITY_PASSWORD_SALT': contents['server']['secret_key']
}
return result
|