diff --git a/auth_manager.py b/auth_manager.py new file mode 100644 index 0000000..d6bdc2c --- /dev/null +++ b/auth_manager.py @@ -0,0 +1,25 @@ +#Can only be imported on main.py + +import yaml + +username: str = None +password: str = None + +auth_secret_file_location = './secrets/auth.yaml' + +def load_username_password_from_secrets(): + global username + global password + + with open(auth_secret_file_location, 'r') as auth_file: + auth_object = yaml.safe_load(auth_file) + + username = auth_object['username'] + password = auth_object['password'] + + +def get_username_password(): + return username, password + + +load_username_password_from_secrets() \ No newline at end of file