Loading poolpay/__main__.py +18 −1 Original line number Diff line number Diff line Loading @@ -5,14 +5,31 @@ from sqlalchemy.orm import Session from poolpay import db from poolpay.model.Retrievable import Retrievable from poolpay.vault.Vault import Vault proj_dir = Path(__file__).parent.parent.resolve() instance_dir = proj_dir / "instance" vault_file = proj_dir / "instance.img" db_file = instance_dir / "poolpay.db" # TODO Start UI (with a basic message indicating the application is locked and a password is required) password = "hunter2" # TODO Prompt for this instead of hardcoding it into the file vault = Vault(vault_file, instance_dir) if not vault_file.exists(): vault.create(password) try: vault.open(password) engine = create_engine(f"sqlite:///{db_file}") Retrievable.metadata.create_all(engine) db.session = Session(engine) # TODO Initialize card reader (on card presented: Update UI, book transaction) # TODO Change UI to a "ready" state finally: pass db.session.close() engine.dispose() vault.close() Loading
poolpay/__main__.py +18 −1 Original line number Diff line number Diff line Loading @@ -5,14 +5,31 @@ from sqlalchemy.orm import Session from poolpay import db from poolpay.model.Retrievable import Retrievable from poolpay.vault.Vault import Vault proj_dir = Path(__file__).parent.parent.resolve() instance_dir = proj_dir / "instance" vault_file = proj_dir / "instance.img" db_file = instance_dir / "poolpay.db" # TODO Start UI (with a basic message indicating the application is locked and a password is required) password = "hunter2" # TODO Prompt for this instead of hardcoding it into the file vault = Vault(vault_file, instance_dir) if not vault_file.exists(): vault.create(password) try: vault.open(password) engine = create_engine(f"sqlite:///{db_file}") Retrievable.metadata.create_all(engine) db.session = Session(engine) # TODO Initialize card reader (on card presented: Update UI, book transaction) # TODO Change UI to a "ready" state finally: pass db.session.close() engine.dispose() vault.close()