53af975601
I did not really used a standard python format so far. Running the codebase through black to make everything pep-8 compliant.
22 lines
695 B
Python
22 lines
695 B
Python
import os
|
|
|
|
from axione_api.api import query_axione_pto, parse_response
|
|
from axione_api.config import parse_config
|
|
|
|
|
|
if __name__ == "__main__":
|
|
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")
|
|
presp = parse_response(resp)
|
|
print(presp)
|