Implement configuration parser

pull/1/head
Mark Veidemanis 3 years ago
parent 0aa1b3d58d
commit 2601d4a2e4
Signed by: m
GPG Key ID: 5ACFCEED46C0904F

3
.gitignore vendored

@ -3,4 +3,5 @@
__pycache__/
env/
keys/
handler/settings.py
handler/settings.ini

@ -0,0 +1,7 @@
# Other library imports
from ConfigObject import ConfigObject
revolut_token = ""
settings = ConfigObject()
settings.read("settings.ini")

@ -1,14 +0,0 @@
from types import SimpleNamespace
pre_settings = {
"token_refresh_sec": 100,
"api_base": "https://sandbox-b2b.revolut.com/api/1.0",
"webhook_url": "https://callback-sandbox.pathogen.is/callback",
"redis_socket": "/var/run/redis/redis.sock",
"refresh_token": "",
"access_token": "",
"client_id": "",
"jwt": "",
}
settings = SimpleNamespace(**pre_settings)
Loading…
Cancel
Save