Implement configuration parser
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -3,4 +3,5 @@
|
|||||||
__pycache__/
|
__pycache__/
|
||||||
env/
|
env/
|
||||||
keys/
|
keys/
|
||||||
handler/settings.py
|
handler/settings.ini
|
||||||
|
|
||||||
|
|||||||
7
handler/settings.py
Normal file
7
handler/settings.py
Normal file
@@ -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)
|
|
||||||
Reference in New Issue
Block a user