Implement configuration parser
This commit is contained in:
parent
0aa1b3d58d
commit
2601d4a2e4
|
@ -3,4 +3,5 @@
|
||||||
__pycache__/
|
__pycache__/
|
||||||
env/
|
env/
|
||||||
keys/
|
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…
Reference in New Issue