Created
May 19, 2015 00:01
-
-
Save minorsecond/915b690c1f12d973bfb9 to your computer and use it in GitHub Desktop.
Sqlalchemy/Sqlcipher code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if encryption is True: | |
print("***PYPER TIMESHEET UTILITY***") | |
print("\nEnter encryption password below:") | |
key = getpass.getpass() | |
DB_NAME = ".timesheet.db?cipher=aes-256-cfb&kdf_iter=64000" | |
engine = create_engine('sqlite:///{}'.format(DB_NAME), module=sqlite) | |
else: | |
print("WARNING: Unencrypted session. Install pysqlcipher3 to enable encryption\n") | |
engine = create_engine('sqlite:///{}'.format(DB_NAME)) | |
DBSession = sessionmaker(bind=engine) | |
session = DBSession() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment