2021-10-17 18:16:29 +02:00
|
|
|
import os
|
|
|
|
|
2021-10-17 22:21:07 +02:00
|
|
|
from axione_api.api import query_axione_pto, parse_response
|
2021-10-17 18:16:29 +02:00
|
|
|
from axione_api.config import parse_config
|
|
|
|
|
|
|
|
|
2021-10-17 22:21:07 +02:00
|
|
|
if __name__ == "__main__":
|
2021-10-17 18:16:29 +02:00
|
|
|
cfg_path = os.environ.get("CONFIG", "/etc/axione-elig-test.ini")
|
|
|
|
print(f'Reading the "{cfg_path}" config file')
|
|
|
|
cfg = parse_config(cfg_path)
|
|
|
|
cfg.debug = True if "DEBUG" in os.environ else False
|
|
|
|
if cfg.debug:
|
|
|
|
print("===================")
|
|
|
|
print("DEBUG_MODE")
|
|
|
|
print("No requests will be performed")
|
|
|
|
print("We'll inject some dummy data instead")
|
|
|
|
print("===================")
|
|
|
|
print("")
|
|
|
|
|
|
|
|
resp = query_axione_pto(cfg, "SPTH-BIEM2-0197")
|
2021-10-17 22:21:07 +02:00
|
|
|
presp = parse_response(resp)
|
|
|
|
print(presp)
|