import dotenv import os import utils.getdeviceevents import utils.allowlist import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) dotenv.load_dotenv() url = "https://172.17.22.240:3129" def apivalidation(): print("=== Welcome to the Airlock API Tool ===") match os.getenv('APIKEY'): case '': print("Please add your API Key to the .env file") case _: menu() def menu(): print("\n--- Main Menu ---") print("1. Get All Events for Single Device") print("2. Get Execution Histories for Allow List") while True: choice = input("Enter Menu Item: ") if choice == '1': utils.getdeviceevents.devicehistory(url) if choice == '2': utils.allowlist.allowlistexechistories(url) if __name__ == "__main__": apivalidation()