from nicegui import * from bookrequest import * import configparser config = configparser.ConfigParser() try: config.read('config.ini') except Exception as e: print(e) print('Config file not found. Please ensure conf.ini is in the same \ location as bookrequest.py') def pass_command() -> None: if title.value != '': result = searchBook(title.value, unattended=True) ui.notify('Searching and Downloading Book!') downloadBook(result) with ui.card().classes('absolute-center'): title = ui.input('Title').on('keydown.enter', pass_command) ui.run(host=config['data']['host'],port=int(config['data']['port']))