BTSCEINGVMflyermlops :: flyermlops/data/connector.py :: lf._user = unquote(parsed.username) self._password = unquote(parsed.password) self._host = unquote(parsed.hostname) self._port = parsed.port self._d flyermlops :: flyermlops/data/connector.py :: = { "user": self._user, "password": self._password, "host": self._host, "logmech": self._logmech, } if self._port i flyermlops :: flyermlops/data/connector_base.py :: st = host self._user = user self._password = password self._port = port self._uri = uri self._logmech = logmech self._table_suffix = flyermlops :: flyermlops/tracking/base/tracking_base.py :: host = host self.user = user self.password = password self.port = port self.database = database self.project_name = project_name sel ods-pred-helper :: connections/connections.py :: pr = param_getter.get_param(ppr_param) dwprod_password = param_getter.get_param(pw_param) cnxn = teradatasql.connect( None, host="dwprod.delta.com", ods-pred-helper :: ods_pred_helper/connections/connections.py :: isinstance(secret_pw_term, list): dwprod_password = __get_nested_value(secrets_dict, secret_pw_term) else: dwprod_password = secrets_dict[secret_pw_term] ods-pred-helper :: ods_pred_helper/connections/connections.py :: ts_dict, secret_pw_term) else: dwprod_password = secrets_dict[secret_pw_term] cnxn = teradatasql.connect( None, host="dwprod.delta.com", us ods-pred-helper :: ods_pred_helper/connections/connections.py :: isinstance(secret_pw_term, list): dwprod_password = __get_nested_value(secrets_dict, secret_pw_term) else: dwprod_password = secrets_dict[secret_pw_term] ods-pred-helper :: ods_pred_helper/connections/connections.py :: ts_dict, secret_pw_term) else: dwprod_password = secrets_dict[secret_pw_term] cnxn = teradatasql.connect( None, host="dwprod.delta.com", us flyermlops :: flyermlops/data/connector.py :: lf._user = unquote(parsed.username) self._password = unquote(parsed.password) self._host = unquote(parsed.hostname) self._port = parsed.port self._d flyermlops :: flyermlops/data/connector.py :: = { "user": self._user, "password": self._password, "host": self._host, "logmech": self._logmech, } if self._port i flyermlops :: flyermlops/data/connector_base.py :: st = host self._user = user self._password = password self._port = port self._uri = uri self._logmech = logmech self._table_suffix = flyermlops :: flyermlops/tracking/base/tracking_base.py :: host = host self.user = user self.password = password self.port = port self.database = database self.project_name = project_name sel flyermlops :: flyermlops/data/connector.py :: lf._user = unquote(parsed.username) self._password = unquote(parsed.password) self._host = unquote(parsed.hostname) self._port = parsed.port self._d flyermlops :: flyermlops/data/connector.py :: = { "user": self._user, "password": self._password, "host": self._host, "logmech": self._logmech, } if self._port i flyermlops :: flyermlops/data/connector_base.py :: st = host self._user = user self._password = password self._port = port self._uri = uri self._logmech = logmech self._table_suffix = flyermlops :: flyermlops/tracking/base/tracking_base.py :: host = host self.user = user self.password = password self.port = port self.database = database self.project_name = project_name sel oautils :: oautils/db2.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_db2_service",kr_usern oautils :: oautils/db2.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/ftp.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/ftp.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/hana.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/hana.py :: sword is None: try: username, password = get_value(kr_service, kr_user, kr_service, kr_password) except Exception as e: log_fn("You must pro oautils :: oautils/keyring_.py :: # Access teradata username and password username, password = get_value('teradata','username','teradata','password') # Reset keyring (delete current setup to allow for re-running ` oautils :: oautils/keyring_.py :: e and password for teradata service username, password = get_value('teradata','username', 'teradata', 'password') ``` This function is optimized to minimize keyring ca oautils :: oautils/keyring_.py :: ey, kr_password_key, **kwargs): username, password = get_user_pass(kwargs, kr_service, kr_username_key, kr_password_key) # Use username/password in function call oautils :: oautils/oracle.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_oracle_service",kr_us oautils :: oautils/oracle.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/postgres.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_postgres_service",kr_ oautils :: oautils/postgres.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/sharepoint.py :: None or client_secret is None: client_id, client_secret = get_value(kr_service, kr_client_id_key, kr_service, kr_client_secret_key) log_fn(f"Getting SharePoint context oautils :: oautils/sqlserver.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_sql_service",kr_usern oautils :: oautils/sqlserver.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/tableau_api.py :: ss_token_name, "personal_access_token_secret": personal_access_token_secret, "site_name": site_name, "site_url": site_url, } } t oautils :: oautils/teradata.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_td_service",kr_userna oautils :: oautils/teradata.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/database.py :: .com", port=1025, username="my_user", password = "my_pass", connect_args = {"logmech": "LDAP"}, ) # Get a connection using specific keyring service info conn = get oautils :: oautils/database.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/db2.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_db2_service",kr_usern oautils :: oautils/ftp.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/ftp.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/hana.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/keyring_.py :: # Access teradata username and password username, password = get_value('teradata','username','teradata','password') # Reset keyring (delete current setup to allow for re-running ` oautils :: oautils/keyring_.py :: e and password for teradata service username, password = get_value('teradata','username', 'teradata', 'password') ``` This function is optimized to minimize keyring ca oautils :: oautils/keyring_.py :: ey, kr_password_key, **kwargs): username, password = get_user_pass(kwargs, kr_service, kr_username_key, kr_password_key) # Use username/password in function call oautils :: oautils/oracle.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_oracle_service",kr_us oautils :: oautils/postgres.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_postgres_service",kr_ oautils :: oautils/sharepoint.py :: None or client_secret is None: client_id, client_secret = get_value(kr_service, kr_client_id_key, kr_service, kr_client_secret_key) log_fn(f"Getting SharePoint context oautils :: oautils/sqlserver.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_sql_service",kr_usern oautils :: oautils/tableau_api.py :: ss_token_name, "personal_access_token_secret": personal_access_token_secret, "site_name": site_name, "site_url": site_url, } } t oautils :: oautils/teradata.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_td_service",kr_userna oautils :: oautils/aws/secrets_manager.py :: Get two values from keys in the secret username, password = get_value('my_secret', 'my_key1', 'my_key2') # Get values from secret or keyring if secret doesn't work username = get oautils :: oautils/database.py :: .com", port=1025, username="my_user", password = "my_pass", connect_args = {"logmech": "LDAP"}, ) # Get a connection using specific keyring service info conn = get oautils :: oautils/database.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/db2.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_db2_service",kr_usern oautils :: oautils/ftp.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/ftp.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/hana.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/keyring_.py :: # Access teradata username and password username, password = get_value('teradata','username','teradata','password') # Reset keyring (delete current setup to allow for re-running ` oautils :: oautils/keyring_.py :: e and password for teradata service username, password = get_value('teradata','username', 'teradata', 'password') ``` This function is optimized to minimize keyring ca oautils :: oautils/keyring_.py :: ey, kr_password_key, **kwargs): username, password = get_user_pass(kwargs, kr_service, kr_username_key, kr_password_key) # Use username/password in function call oautils :: oautils/oracle.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_oracle_service",kr_us oautils :: oautils/postgres.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_postgres_service",kr_ oautils :: oautils/sharepoint.py :: None or client_secret is None: client_id, client_secret = get_value(kr_service, kr_client_id_key, kr_service, kr_client_secret_key) log_fn(f"Getting SharePoint context oautils :: oautils/sqlserver.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_sql_service",kr_usern oautils :: oautils/tableau_api.py :: ss_token_name, "personal_access_token_secret": personal_access_token_secret, "site_name": site_name, "site_url": site_url, } } t oautils :: oautils/teradata.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_td_service",kr_userna oautils :: oautils/aws/secrets_manager.py :: Get two values from keys in the secret username, password = get_value('my_secret', 'my_key1', 'my_key2') # Get values from secret or keyring if secret doesn't work username = get oautils :: oautils/database.py :: .com", port=1025, username="my_user", password = "my_pass", connect_args = {"logmech": "LDAP"}, ) # Get a connection using specific keyring service info conn = get oautils :: oautils/database.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/db2.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_db2_service",kr_usern oautils :: oautils/ftp.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/ftp.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/hana.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/keyring_.py :: # Access teradata username and password username, password = get_value('teradata','username','teradata','password') # Reset keyring (delete current setup to allow for re-running ` oautils :: oautils/keyring_.py :: e and password for teradata service username, password = get_value('teradata','username', 'teradata', 'password') ``` This function is optimized to minimize keyring ca oautils :: oautils/keyring_.py :: ey, kr_password_key, **kwargs): username, password = get_user_pass(kwargs, kr_service, kr_username_key, kr_password_key) # Use username/password in function call oautils :: oautils/oracle.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_oracle_service",kr_us oautils :: oautils/postgres.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_postgres_service",kr_ oautils :: oautils/sharepoint.py :: None or client_secret is None: client_id, client_secret = get_value(kr_service, kr_client_id_key, kr_service, kr_client_secret_key) log_fn(f"Getting SharePoint context oautils :: oautils/sqlserver.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_sql_service",kr_usern oautils :: oautils/tableau_api.py :: ss_token_name, "personal_access_token_secret": personal_access_token_secret, "site_name": site_name, "site_url": site_url, } } t oautils :: oautils/teradata.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_td_service",kr_userna python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class AWSSecretCredential(DataCredential): """Class for login credentials that are stored in AWS Secrets python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "aro_mom_int" region_name = "us-east-1" secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): oautils :: oautils/aws/secrets_manager.py :: Get two values from keys in the secret username, password = get_value('my_secret', 'my_key1', 'my_key2') # Get values from secret or keyring if secret doesn't work username = get oautils :: oautils/database.py :: .com", port=1025, username="my_user", password = "my_pass", connect_args = {"logmech": "LDAP"}, ) # Get a connection using specific keyring service info conn = get oautils :: oautils/database.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/db2.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_db2_service",kr_usern oautils :: oautils/ftp.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/ftp.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/hana.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/keyring_.py :: # Access teradata username and password username, password = get_value('teradata','username','teradata','password') # Reset keyring (delete current setup to allow for re-running ` oautils :: oautils/keyring_.py :: e and password for teradata service username, password = get_value('teradata','username', 'teradata', 'password') ``` This function is optimized to minimize keyring ca oautils :: oautils/keyring_.py :: ey, kr_password_key, **kwargs): username, password = get_user_pass(kwargs, kr_service, kr_username_key, kr_password_key) # Use username/password in function call oautils :: oautils/oracle.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_oracle_service",kr_us oautils :: oautils/postgres.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_postgres_service",kr_ oautils :: oautils/sharepoint.py :: None or client_secret is None: client_id, client_secret = get_value(kr_service, kr_client_id_key, kr_service, kr_client_secret_key) log_fn(f"Getting SharePoint context oautils :: oautils/sqlserver.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_sql_service",kr_usern oautils :: oautils/tableau_api.py :: ss_token_name, "personal_access_token_secret": personal_access_token_secret, "site_name": site_name, "site_url": site_url, } } t oautils :: oautils/teradata.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_td_service",kr_userna oautils :: oautils/aws/secrets_manager.py :: Get two values from keys in the secret username, password = get_value('my_secret', 'my_key1', 'my_key2') # Get values from secret or keyring if secret doesn't work username = get oautils :: oautils/database.py :: .com", port=1025, username="my_user", password = "my_pass", connect_args = {"logmech": "LDAP"}, ) # Get a connection using specific keyring service info conn = get oautils :: oautils/database.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/db2.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_db2_service",kr_usern oautils :: oautils/ftp.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/ftp.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/hana.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/keyring_.py :: # Access teradata username and password username, password = get_value('teradata','username','teradata','password') # Reset keyring (delete current setup to allow for re-running ` oautils :: oautils/keyring_.py :: e and password for teradata service username, password = get_value('teradata','username', 'teradata', 'password') ``` This function is optimized to minimize keyring ca oautils :: oautils/keyring_.py :: ey, kr_password_key, **kwargs): username, password = get_user_pass(kwargs, kr_service, kr_username_key, kr_password_key) # Use username/password in function call oautils :: oautils/oracle.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_oracle_service",kr_us oautils :: oautils/postgres.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_postgres_service",kr_ oautils :: oautils/sharepoint.py :: None or client_secret is None: client_id, client_secret = get_value(kr_service, kr_client_id_key, kr_service, kr_client_secret_key) log_fn(f"Getting SharePoint context oautils :: oautils/sqlserver.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_sql_service",kr_usern oautils :: oautils/tableau_api.py :: ss_token_name, "personal_access_token_secret": personal_access_token_secret, "site_name": site_name, "site_url": site_url, } } t oautils :: oautils/teradata.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_td_service",kr_userna flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "aro_mom_int" region_name = "us-east-1" secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class AWSSecretCredential(DataCredential): """Class for login credentials that are stored in AWS Secrets python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class AWSSecretCredential(DataCredential): """Class for login credentials that are stored in AWS Secrets python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "aro_mom_int" region_name = "us-east-1" secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): oautils :: oautils/aws/secrets_manager.py :: Get two values from keys in the secret username, password = get_value('my_secret', 'my_key1', 'my_key2') # Get values from secret or keyring if secret doesn't work username = get oautils :: oautils/database.py :: .com", port=1025, username="my_user", password = "my_pass", connect_args = {"logmech": "LDAP"}, ) # Get a connection using specific keyring service info conn = get oautils :: oautils/database.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/db2.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_db2_service",kr_usern oautils :: oautils/ftp.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/ftp.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/hana.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/keyring_.py :: # Access teradata username and password username, password = get_value('teradata','username','teradata','password') # Reset keyring (delete current setup to allow for re-running ` oautils :: oautils/keyring_.py :: e and password for teradata service username, password = get_value('teradata','username', 'teradata', 'password') ``` This function is optimized to minimize keyring ca oautils :: oautils/keyring_.py :: ey, kr_password_key, **kwargs): username, password = get_user_pass(kwargs, kr_service, kr_username_key, kr_password_key) # Use username/password in function call oautils :: oautils/oracle.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_oracle_service",kr_us oautils :: oautils/postgres.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_postgres_service",kr_ oautils :: oautils/sharepoint.py :: None or client_secret is None: client_id, client_secret = get_value(kr_service, kr_client_id_key, kr_service, kr_client_secret_key) log_fn(f"Getting SharePoint context oautils :: oautils/sqlserver.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_sql_service",kr_usern oautils :: oautils/tableau_api.py :: ss_token_name, "personal_access_token_secret": personal_access_token_secret, "site_name": site_name, "site_url": site_url, } } t oautils :: oautils/teradata.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_td_service",kr_userna python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class AWSSecretCredential(DataCredential): """Class for login credentials that are stored in AWS Secrets python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "aro_mom_int" region_name = "us-east-1" secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "aro_mom_int" region_name = "us-east-1" secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class AWSSecretCredential(DataCredential): """Class for login credentials that are stored in AWS Secrets python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "aro_mom_int" region_name = "us-east-1" secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "aro_mom_int" region_name = "us-east-1" secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "aro_mom_int" region_name = "us-east-1" secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class AWSSecretCredential(DataCredential): """Class for login credentials that are stored in AWS Secrets python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "aro_mom_int" region_name = "us-east-1" secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: oautils :: oautils/aws/secrets_manager.py :: Get two values from keys in the secret username, password = get_value('my_secret', 'my_key1', 'my_key2') # Get values from secret or keyring if secret doesn't work username = get oautils :: oautils/database.py :: .com", port=1025, username="my_user", password = "my_pass", connect_args = {"logmech": "LDAP"}, ) # Get a connection using specific keyring service info conn = get oautils :: oautils/database.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/db2.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_db2_service",kr_usern oautils :: oautils/ftp.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/ftp.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/hana.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/keyring_.py :: # Access teradata username and password username, password = get_value('teradata','username','teradata','password') # Reset keyring (delete current setup to allow for re-running ` oautils :: oautils/keyring_.py :: e and password for teradata service username, password = get_value('teradata','username', 'teradata', 'password') ``` This function is optimized to minimize keyring ca oautils :: oautils/keyring_.py :: ey, kr_password_key, **kwargs): username, password = get_user_pass(kwargs, kr_service, kr_username_key, kr_password_key) # Use username/password in function call oautils :: oautils/oracle.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_oracle_service",kr_us oautils :: oautils/postgres.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_postgres_service",kr_ oautils :: oautils/sharepoint.py :: None or client_secret is None: client_id, client_secret = get_value(kr_service, kr_client_id_key, kr_service, kr_client_secret_key) log_fn(f"Getting SharePoint context oautils :: oautils/sqlserver.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_sql_service",kr_usern oautils :: oautils/tableau_api.py :: ss_token_name, "personal_access_token_secret": personal_access_token_secret, "site_name": site_name, "site_url": site_url, } } t oautils :: oautils/teradata.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_td_service",kr_userna delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: serverless-projen-projects :: serverless_projen_projects/patterns/common/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: me_mapping={"lambda_rotation": "lambdaRotation", "secret": "secret"}, ) class LambdaAtEdgeSecret: def __init__( self, *, lambda_rotation: _aws_cdk_aws_l delta-aws-cdk :: delta/aws_cdk_lib/patterns/__init__.py :: "lambda_rotation": lambda_rotation, "secret": secret, } @builtins.property def lambda_rotation(self) -> _aws_cdk_aws_lambda_ceddda9d.IFunction: python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class AWSSecretCredential(DataCredential): """Class for login credentials that are stored in AWS Secrets python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k serverless-projen-projects :: serverless_projen_projects/patterns/common/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k serverless-projen-projects :: serverless_projen_projects/patterns/common/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k serverless-projen-projects :: serverless_projen_projects/patterns/common/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class AWSSecretCredential(DataCredential): """Class for login credentials that are stored in AWS Secrets python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "aro_mom_int" region_name = "us-east-1" secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): oautils :: oautils/aws/secrets_manager.py :: Get two values from keys in the secret username, password = get_value('my_secret', 'my_key1', 'my_key2') # Get values from secret or keyring if secret doesn't work username = get oautils :: oautils/database.py :: .com", port=1025, username="my_user", password = "my_pass", connect_args = {"logmech": "LDAP"}, ) # Get a connection using specific keyring service info conn = get oautils :: oautils/database.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/db2.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_db2_service",kr_usern oautils :: oautils/ftp.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/ftp.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/hana.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/keyring_.py :: # Access teradata username and password username, password = get_value('teradata','username','teradata','password') # Reset keyring (delete current setup to allow for re-running ` oautils :: oautils/keyring_.py :: e and password for teradata service username, password = get_value('teradata','username', 'teradata', 'password') ``` This function is optimized to minimize keyring ca oautils :: oautils/keyring_.py :: ey, kr_password_key, **kwargs): username, password = get_user_pass(kwargs, kr_service, kr_username_key, kr_password_key) # Use username/password in function call oautils :: oautils/oracle.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_oracle_service",kr_us oautils :: oautils/postgres.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_postgres_service",kr_ oautils :: oautils/sharepoint.py :: None or client_secret is None: client_id, client_secret = get_value(kr_service, kr_client_id_key, kr_service, kr_client_secret_key) log_fn(f"Getting SharePoint context oautils :: oautils/sqlserver.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_sql_service",kr_usern oautils :: oautils/tableau_api.py :: ss_token_name, "personal_access_token_secret": personal_access_token_secret, "site_name": site_name, "site_url": site_url, } } t oautils :: oautils/teradata.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_td_service",kr_userna delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k globalsalesutility :: global_sales_script_utilities/common/cogniro_creds.py :: " CLIENT_ID = 'SMTSBMENCI_eNCIAWSCOGNITO_CC_SI' CLIENT_SECRET = 'xelmTR10yjDm2fEtmYEZWsXiNFZI8iz19O8tAeiGQBt9OMU67ZbcsVzNyuRWyLoG' role_arn = cognito_mapping.get(block_code).g globalsalesutility :: global_sales_script_utilities/common/cogniro_creds.py :: dentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) globalsalesutility :: global_sales_script_utilities/common/cogniro_creds_test.py :: cs/SAMLSP1I5YZQGG4WXKVCOU" CLIENT_ID = '335665' CLIENT_SECRET = 'Qwerty12345@' role_arn = cognito_mapping.get(block_code).get("accountRole") print(role_arn) # CREDENTIALS_ globalsalesutility :: global_sales_script_utilities/common/cogniro_creds_test.py :: dentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) globalsalesutility :: global_sales_script_utilities/glue/aws_utils.py :: secret_value(SecretId=secret_name) secret = secret_response["SecretString"] return secret except ClientError as e: print("Error Re globalsalesutility :: global_sales_script_utilities/glue/glue_db_utils.py :: name",secret.get("db_username")) self.db_password = secret.get("password",secret.get("db_password")) self.host = secret.get("host",secret.get("db_host")) globalsalesutility :: global_sales_script_utilities/glue/glue_db_utils.py :: "user": self.db_username, "password": self.db_password, "dbtable": table_name, } class TeradataDatabaseManager(BaseDatabaseManager globalsalesutility :: global_sales_script_utilities/glue/glue_db_utils.py :: eradata.jdbc.TeraDriver" self.db_url = f"jdbc:teradata://{self.host}" def fetch_data_into_dataframe(self, query: str) -> "pyspark.sql.dataframe.DataFrame": globalsalesutility :: global_sales_script_utilities/glue/glue_db_utils.py :: cret_id, glue_context) self.db_url = f"jdbc:db2://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "com.ibm.db2.jcc.DB2Driver" self.db globalsalesutility :: global_sales_script_utilities/glue/glue_db_utils.py :: cret_id, glue_context) self.db_url = f"jdbc:postgresql://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "org.postgresql.Driver" self globalsalesutility :: global_sales_script_utilities/glue/glue_utils.py :: "username",secret.get("db_username")) db_password = secret.get("password",secret.get("db_password")) jdbc_driver_name = driver return db_url, db_username globalsalesutility :: global_sales_script_utilities/glue/glue_utils.py :: tgresql.Driver", "conn_string": "jdbc:postgresql://{host}:{port}/{dbname}", }, "oracle": { "driver": "oracle.jdbc.driver globalsalesutility :: global_sales_script_utilities/glue/glue_utils.py :: r.OracleDriver", "conn_string": "jdbc:oracle://{host}:{port}/{dbname}", }, "oracle_thin": { "conn_string": "jdbc:oracle: globalsalesutility :: global_sales_script_utilities/glue/glue_utils.py :: "teradata": { "conn_string": "jdbc:teradata://{host}", "driver": "com.teradata.jdbc.TeraDriver", }, } def get_stat globalsalesutility :: global_sales_stack_utilities/aws_glue/glue_utils.py :: _med_bucket_name, "{edw_database_secret}": self.edw_database_secret_name, "{member_table_name}": self.deployment_env["member_table_name"], globalsalesutility :: global_sales_stack_utilities/aws_glue/glue_utils.py :: sbmgsds_admin_secret", "{sds_dms_secret}": self.sds_dms_database_secret_name, } def get_default_args(self): return { "--e globalsalesutility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: e RDS DB Secret """ templated_secret = secretsmanager.SecretStringGenerator( secret_string_template=json.dumps({"username": self.rds_instance_detai globalsalesutility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: tails["secret_length"], ) rds_secret = secretsmanager.Secret(self, "RDS-Secret", generate_secret_string=templated_secret) return rds_secret de globalsalesutility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: Output(self, f"{rds_name}-jdbc-endpoint", value=f"jdbc:postgresql://{endpoint}:{port}") def create_replica_db_instance(self): """ Create Replica Instance globalsalesutility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: elf, f"{rds_name}-replica-jdbc-endpoint", value=f"jdbc:postgresql://{endpoint}:{port}") def create_db_proxy(self, primary_instance): proxy = rds.DatabaseProxy( globalsalesutility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ils["secretJsonKey"] encrypted_password = secret_details["credentials"][secret_key] encryption_key = self.deployment_env["encryption_key"] globalsalesutility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ))) else: templated_secret = secretsmanager.CfnSecret.GenerateSecretStringProperty( secret_string_template=json.dumps(secret_deta globalsalesutility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: cret(self, secret_details, credentials): secret = secretsmanager.CfnSecret( self, secret_details["secret_name"], description=secret_ global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: " CLIENT_ID = 'SMTSBMENCI_eNCIAWSCOGNITO_CC_SI' CLIENT_SECRET = 'xelmTR10yjDm2fEtmYEZWsXiNFZI8iz19O8tAeiGQBt9OMU67ZbcsVzNyuRWyLoG' role_arn = cognito_mapping.get(block_code).g global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: dentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) global-sales-utility :: global_sales_script_utilities/common/cogniro_creds_test.py :: cs/SAMLSP1I5YZQGG4WXKVCOU" CLIENT_ID = '335665' CLIENT_SECRET = 'Qwerty12345@' role_arn = cognito_mapping.get(block_code).get("accountRole") print(role_arn) # CREDENTIALS_ global-sales-utility :: global_sales_script_utilities/common/cogniro_creds_test.py :: dentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) global-sales-utility :: global_sales_script_utilities/glue/aws_utils.py :: secret_value(SecretId=secret_name) secret = secret_response["SecretString"] return secret except ClientError as e: print("Error Re global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: name",secret.get("db_username")) self.db_password = secret.get("password",secret.get("db_password")) self.host = secret.get("host",secret.get("db_host")) global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: "user": self.db_username, "password": self.db_password, "dbtable": table_name, } class TeradataDatabaseManager(BaseDatabaseManager global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: eradata.jdbc.TeraDriver" self.db_url = f"jdbc:teradata://{self.host}" def fetch_data_into_dataframe(self, query: str) -> "pyspark.sql.dataframe.DataFrame": global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: cret_id, glue_context) self.db_url = f"jdbc:db2://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "com.ibm.db2.jcc.DB2Driver" self.db global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: cret_id, glue_context) self.db_url = f"jdbc:postgresql://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "org.postgresql.Driver" self global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: "username",secret.get("db_username")) db_password = secret.get("password",secret.get("db_password")) jdbc_driver_name = driver return db_url, db_username global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: tgresql.Driver", "conn_string": "jdbc:postgresql://{host}:{port}/{dbname}", }, "oracle": { "driver": "oracle.jdbc.driver global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: r.OracleDriver", "conn_string": "jdbc:oracle://{host}:{port}/{dbname}", }, "oracle_thin": { "conn_string": "jdbc:oracle: global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: "teradata": { "conn_string": "jdbc:teradata://{host}", "driver": "com.teradata.jdbc.TeraDriver", }, } def get_stat global-sales-utility :: global_sales_stack_utilities/aws_glue/glue_utils.py :: _med_bucket_name, "{edw_database_secret}": self.edw_database_secret_name, "{member_table_name}": self.deployment_env["member_table_name"], global-sales-utility :: global_sales_stack_utilities/aws_glue/glue_utils.py :: sbmgsds_admin_secret", "{sds_dms_secret}": self.sds_dms_database_secret_name, } def get_default_args(self): return { "--e global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: e RDS DB Secret """ templated_secret = secretsmanager.SecretStringGenerator( secret_string_template=json.dumps({"username": self.rds_instance_detai global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: tails["secret_length"], ) rds_secret = secretsmanager.Secret(self, "RDS-Secret", generate_secret_string=templated_secret) return rds_secret de global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: Output(self, f"{rds_name}-jdbc-endpoint", value=f"jdbc:postgresql://{endpoint}:{port}") def create_replica_db_instance(self): """ Create Replica Instance global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: elf, f"{rds_name}-replica-jdbc-endpoint", value=f"jdbc:postgresql://{endpoint}:{port}") def create_db_proxy(self, primary_instance): proxy = rds.DatabaseProxy( global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ils["secretJsonKey"] encrypted_password = secret_details["credentials"][secret_key] encryption_key = self.deployment_env["encryption_key"] global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ))) else: templated_secret = secretsmanager.CfnSecret.GenerateSecretStringProperty( secret_string_template=json.dumps(secret_deta global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: cret(self, secret_details, credentials): secret = secretsmanager.CfnSecret( self, secret_details["secret_name"], description=secret_ global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: " CLIENT_ID = 'SMTSBMENCI_eNCIAWSCOGNITO_CC_SI' CLIENT_SECRET = 'xelmTR10yjDm2fEtmYEZWsXiNFZI8iz19O8tAeiGQBt9OMU67ZbcsVzNyuRWyLoG' role_arn = cognito_mapping.get(block_code).g global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: dentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) global-sales-utility :: global_sales_script_utilities/common/cogniro_creds_test.py :: cs/SAMLSP1I5YZQGG4WXKVCOU" CLIENT_ID = '335665' CLIENT_SECRET = 'Qwerty12345@' role_arn = cognito_mapping.get(block_code).get("accountRole") print(role_arn) # CREDENTIALS_ global-sales-utility :: global_sales_script_utilities/common/cogniro_creds_test.py :: dentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) global-sales-utility :: global_sales_script_utilities/glue/aws_utils.py :: secret_value(SecretId=secret_name) secret = secret_response["SecretString"] return secret except ClientError as e: print("Error Re global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: name",secret.get("db_username")) self.db_password = secret.get("password",secret.get("db_password")) self.host = secret.get("host",secret.get("db_host")) global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: "user": self.db_username, "password": self.db_password, "dbtable": table_name, } class TeradataDatabaseManager(BaseDatabaseManager global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: eradata.jdbc.TeraDriver" self.db_url = f"jdbc:teradata://{self.host}" def fetch_data_into_dataframe(self, query: str) -> "pyspark.sql.dataframe.DataFrame": global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: cret_id, glue_context) self.db_url = f"jdbc:db2://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "com.ibm.db2.jcc.DB2Driver" self.db global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: cret_id, glue_context) self.db_url = f"jdbc:postgresql://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "org.postgresql.Driver" self global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: "username",secret.get("db_username")) db_password = secret.get("password",secret.get("db_password")) jdbc_driver_name = driver return db_url, db_username global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: tgresql.Driver", "conn_string": "jdbc:postgresql://{host}:{port}/{dbname}", }, "oracle": { "driver": "oracle.jdbc.driver global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: r.OracleDriver", "conn_string": "jdbc:oracle://{host}:{port}/{dbname}", }, "oracle_thin": { "conn_string": "jdbc:oracle: global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: "teradata": { "conn_string": "jdbc:teradata://{host}", "driver": "com.teradata.jdbc.TeraDriver", }, } def get_stat global-sales-utility :: global_sales_stack_utilities/aws_glue/glue_utils.py :: _med_bucket_name, "{edw_database_secret}": self.edw_database_secret_name, "{member_table_name}": self.deployment_env["member_table_name"], global-sales-utility :: global_sales_stack_utilities/aws_glue/glue_utils.py :: sbmgsds_admin_secret", "{sds_dms_secret}": self.sds_dms_database_secret_name, } def get_default_args(self): return { "--e global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: e RDS DB Secret """ templated_secret = secretsmanager.SecretStringGenerator( secret_string_template=json.dumps({"username": self.rds_instance_detai global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: tails["secret_length"], ) rds_secret = secretsmanager.Secret(self, "RDS-Secret", generate_secret_string=templated_secret) return rds_secret de global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: Output(self, f"{rds_name}-jdbc-endpoint", value=f"jdbc:postgresql://{endpoint}:{port}") def create_replica_db_instance(self): """ Create Replica Instance global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: elf, f"{rds_name}-replica-jdbc-endpoint", value=f"jdbc:postgresql://{endpoint}:{port}") def create_db_proxy(self, primary_instance): proxy = rds.DatabaseProxy( global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ils["secretJsonKey"] encrypted_password = secret_details["credentials"][secret_key] encryption_key = self.deployment_env["encryption_key"] global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ))) else: templated_secret = secretsmanager.CfnSecret.GenerateSecretStringProperty( secret_string_template=json.dumps(secret_deta global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: cret(self, secret_details, credentials): secret = secretsmanager.CfnSecret( self, secret_details["secret_name"], description=secret_ global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: " CLIENT_ID = 'SMTSBMENCI_eNCIAWSCOGNITO_CC_SI' CLIENT_SECRET = 'xelmTR10yjDm2fEtmYEZWsXiNFZI8iz19O8tAeiGQBt9OMU67ZbcsVzNyuRWyLoG' role_arn = cognito_mapping.get(block_code).g global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: dentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) global-sales-utility :: global_sales_script_utilities/common/cogniro_creds_test.py :: cs/SAMLSP1I5YZQGG4WXKVCOU" CLIENT_ID = '335665' CLIENT_SECRET = 'Qwerty12345@' role_arn = cognito_mapping.get(block_code).get("accountRole") print(role_arn) # CREDENTIALS_ global-sales-utility :: global_sales_script_utilities/common/cogniro_creds_test.py :: dentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) global-sales-utility :: global_sales_script_utilities/glue/aws_utils.py :: secret_value(SecretId=secret_name) secret = secret_response["SecretString"] return secret except ClientError as e: print("Error Re global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: name",secret.get("db_username")) self.db_password = secret.get("password",secret.get("db_password")) self.host = secret.get("host",secret.get("db_host")) global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: "user": self.db_username, "password": self.db_password, "dbtable": table_name, } class TeradataDatabaseManager(BaseDatabaseManager global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: eradata.jdbc.TeraDriver" self.db_url = f"jdbc:teradata://{self.host}" def fetch_data_into_dataframe(self, query: str) -> "pyspark.sql.dataframe.DataFrame": global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: cret_id, glue_context) self.db_url = f"jdbc:db2://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "com.ibm.db2.jcc.DB2Driver" self.db global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: cret_id, glue_context) self.db_url = f"jdbc:postgresql://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "org.postgresql.Driver" self global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: "username",secret.get("db_username")) db_password = secret.get("password",secret.get("db_password")) jdbc_driver_name = driver return db_url, db_username global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: tgresql.Driver", "conn_string": "jdbc:postgresql://{host}:{port}/{dbname}", }, "oracle": { "driver": "oracle.jdbc.driver global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: r.OracleDriver", "conn_string": "jdbc:oracle://{host}:{port}/{dbname}", }, "oracle_thin": { "conn_string": "jdbc:oracle: global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: "teradata": { "conn_string": "jdbc:teradata://{host}", "driver": "com.teradata.jdbc.TeraDriver", }, } def get_stat global-sales-utility :: global_sales_stack_utilities/aws_glue/glue_utils.py :: _med_bucket_name, "{edw_database_secret}": self.edw_database_secret_name, "{member_table_name}": self.deployment_env["member_table_name"], global-sales-utility :: global_sales_stack_utilities/aws_glue/glue_utils.py :: sbmgsds_admin_secret", "{sds_dms_secret}": self.sds_dms_database_secret_name, } def get_default_args(self): return { "--e global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: e RDS DB Secret """ templated_secret = secretsmanager.SecretStringGenerator( secret_string_template=json.dumps({"username": self.rds_instance_detai global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: tails["secret_length"], ) rds_secret = secretsmanager.Secret(self, "RDS-Secret", generate_secret_string=templated_secret) return rds_secret de global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: Output(self, f"{rds_name}-jdbc-endpoint", value=f"jdbc:postgresql://{endpoint}:{port}") def create_replica_db_instance(self): """ Create Replica Instance global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: elf, f"{rds_name}-replica-jdbc-endpoint", value=f"jdbc:postgresql://{endpoint}:{port}") def create_db_proxy(self, primary_instance): proxy = rds.DatabaseProxy( global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ils["secretJsonKey"] encrypted_password = secret_details["credentials"][secret_key] encryption_key = self.deployment_env["encryption_key"] global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ))) else: templated_secret = secretsmanager.CfnSecret.GenerateSecretStringProperty( secret_string_template=json.dumps(secret_deta global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: cret(self, secret_details, credentials): secret = secretsmanager.CfnSecret( self, secret_details["secret_name"], description=secret_ delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class AWSSecretCredential(DataCredential): """Class for login credentials that are stored in AWS Secrets python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "aro_mom_int" region_name = "us-east-1" secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): oautils :: oautils/aws/secrets_manager.py :: Get two values from keys in the secret username, password = get_value('my_secret', 'my_key1', 'my_key2') # Get values from secret or keyring if secret doesn't work username = get oautils :: oautils/database.py :: .com", port=1025, username="my_user", password = "my_pass", connect_args = {"logmech": "LDAP"}, ) # Get a connection using specific keyring service info conn = get oautils :: oautils/database.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/db2.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_db2_service",kr_usern oautils :: oautils/ftp.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/ftp.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/hana.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/keyring_.py :: # Access teradata username and password username, password = get_value('teradata','username','teradata','password') # Reset keyring (delete current setup to allow for re-running ` oautils :: oautils/keyring_.py :: e and password for teradata service username, password = get_value('teradata','username', 'teradata', 'password') ``` This function is optimized to minimize keyring ca oautils :: oautils/keyring_.py :: ey, kr_password_key, **kwargs): username, password = get_user_pass(kwargs, kr_service, kr_username_key, kr_password_key) # Use username/password in function call oautils :: oautils/oracle.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_oracle_service",kr_us oautils :: oautils/postgres.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_postgres_service",kr_ oautils :: oautils/redshift.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Connect to user.specified.host at port 1234 and database db conn = get_conn('user.specified.host',1234,'d oautils :: oautils/redshift.py :: er.specified.host',1234,'db', username="my_user", password = "my_pass") # Use established connection to get data as dataframe df = get_data('select * from my.table', conn) # Clos oautils :: oautils/sharepoint.py :: None or client_secret is None: client_id, client_secret = get_value(kr_service, kr_client_id_key, kr_service, kr_client_secret_key) log_fn(f"Getting SharePoint context oautils :: oautils/sqlserver.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_sql_service",kr_usern oautils :: oautils/tableau_api.py :: ss_token_name, "personal_access_token_secret": personal_access_token_secret, "site_name": site_name, "site_url": site_url, } } t oautils :: oautils/teradata.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_td_service",kr_userna flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "aro_mom_int" region_name = "us-east-1" secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N schedule-impact-optimizer :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimizer :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimizer :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) oautils :: oautils/aws/secrets_manager.py :: Get two values from keys in the secret username, password = get_value('my_secret', 'my_key1', 'my_key2') # Get values from secret or keyring if secret doesn't work username = get oautils :: oautils/database.py :: .com", port=1025, username="my_user", password = "my_pass", connect_args = {"logmech": "LDAP"}, ) # Get a connection using specific keyring service info conn = get oautils :: oautils/database.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/db2.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_db2_service",kr_usern oautils :: oautils/ftp.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/ftp.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/hana.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/keyring_.py :: # Access teradata username and password username, password = get_value('teradata','username','teradata','password') # Reset keyring (delete current setup to allow for re-running ` oautils :: oautils/keyring_.py :: e and password for teradata service username, password = get_value('teradata','username', 'teradata', 'password') ``` This function is optimized to minimize keyring ca oautils :: oautils/keyring_.py :: ey, kr_password_key, **kwargs): username, password = get_user_pass(kwargs, kr_service, kr_username_key, kr_password_key) # Use username/password in function call oautils :: oautils/o365/graph_api.py :: "scope": scope, "client_secret": client_secret, "grant_type": "client_credentials", }, ) r.raise_for_s oautils :: oautils/oracle.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_oracle_service",kr_us oautils :: oautils/postgres.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_postgres_service",kr_ oautils :: oautils/redshift.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Connect to user.specified.host at port 1234 and database db conn = get_conn('user.specified.host',1234,'d oautils :: oautils/redshift.py :: er.specified.host',1234,'db', username="my_user", password = "my_pass") # Use established connection to get data as dataframe df = get_data('select * from my.table', conn) # Clos oautils :: oautils/sharepoint.py :: None or client_secret is None: client_id, client_secret = get_value(kr_service, kr_client_id_key, kr_service, kr_client_secret_key) log_fn(f"Getting SharePoint context oautils :: oautils/sqlserver.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_sql_service",kr_usern oautils :: oautils/tableau_api.py :: ss_token_name, "personal_access_token_secret": personal_access_token_secret, "site_name": site_name, "site_url": site_url, } } t oautils :: oautils/teradata.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_td_service",kr_userna schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: e RDS DB Secret """ templated_secret = secretsmanager.SecretStringGenerator( secret_string_template=json.dumps( {"username": self. global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: _details.secret_length, ) rds_secret = secretsmanager.Secret( self.stack_, "RDS-Secret", generate_secret_string=templated_secret ) global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ils["secretJsonKey"] encrypted_password = secret_details["credentials"][secret_key] encryption_key = self.deployment_env["encryption_key"] global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ))) else: templated_secret = secretsmanager.CfnSecret.GenerateSecretStringProperty( secret_string_template=json.dumps(secret_deta global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: cret(self, secret_details, credentials): secret = secretsmanager.CfnSecret( self, secret_details["secret_name"], description=secret_ serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: h2" CLIENT_ID = 'SMTSBMENCI_eNCIAWSCOGNITO_CC_SI' CLIENT_SECRET = 'xelmTR10yjDm2fEtmYEZWsXiNFZI8iz19O8tAeiGQBt9OMU67ZbcsVzNyuRWyLoG' role_arn = cognito_mapping.get(block_code).get global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: edentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) cr global-sales-utility :: global_sales_script_utilities/glue/aws_utils.py :: t_secret_value(SecretId=secret_name) secret = secret_response["SecretString"] return secret except ClientError as e: print("Error Readi global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: rname",secret.get("db_username")) self.db_password = secret.get("password",secret.get("db_password")) self.host = secret.get("host",secret.get("db_host")) s global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: "user": self.db_username, "password": self.db_password, "dbtable": table_name, } class TeradataDatabaseManager(BaseDatabaseManager): global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: teradata.jdbc.TeraDriver" self.db_url = f"jdbc:teradata://{self.host}" def fetch_data_into_dataframe(self, query: str) -> "pyspark.sql.dataframe.DataFrame": da global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:db2://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "com.ibm.db2.jcc.DB2Driver" self.db2_c global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:postgresql://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "org.postgresql.Driver" self.co global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: ("username",secret.get("db_username")) db_password = secret.get("password",secret.get("db_password")) jdbc_driver_name = driver return db_url, db_username, global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: stgresql.Driver", "conn_string": "jdbc:postgresql://{host}:{port}/{dbname}", }, "oracle": { "driver": "oracle.jdbc.driver.Or global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: er.OracleDriver", "conn_string": "jdbc:oracle://{host}:{port}/{dbname}", }, "oracle_thin": { "conn_string": "jdbc:oracle:thi global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: "teradata": { "conn_string": "jdbc:teradata://{host}", "driver": "com.teradata.jdbc.TeraDriver", }, } def get_static_da global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: eate RDS DB Secret """ templated_secret = secretsmanager.SecretStringGenerator( secret_string_template=json.dumps( {"username": self.rd global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: nce_details.secret_length, ) rds_secret = secretsmanager.Secret( self.stack_, "RDS-Secret", generate_secret_string=templated_secret ) global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: tails["secretJsonKey"] encrypted_password = secret_details["credentials"][secret_key] encryption_key = self.deployment_env["encryption_key"] global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: "]))) else: templated_secret = secretsmanager.CfnSecret.GenerateSecretStringProperty( secret_string_template=json.dumps(secret_detai global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ecret(self, secret_details, credentials): secret = secretsmanager.CfnSecret( self, secret_details["secret_name"], description=secret_det schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: h2" CLIENT_ID = 'SMTSBMENCI_eNCIAWSCOGNITO_CC_SI' CLIENT_SECRET = 'xelmTR10yjDm2fEtmYEZWsXiNFZI8iz19O8tAeiGQBt9OMU67ZbcsVzNyuRWyLoG' role_arn = cognito_mapping.get(block_code).get global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: edentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) cr global-sales-utility :: global_sales_script_utilities/glue/aws_utils.py :: t_secret_value(SecretId=secret_name) secret = secret_response["SecretString"] return secret except ClientError as e: print("Error Readi global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: rname",secret.get("db_username")) self.db_password = secret.get("password",secret.get("db_password")) self.host = secret.get("host",secret.get("db_host")) s global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: "user": self.db_username, "password": self.db_password, "dbtable": table_name, } class TeradataDatabaseManager(BaseDatabaseManager): global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: teradata.jdbc.TeraDriver" self.db_url = f"jdbc:teradata://{self.host}" def fetch_data_into_dataframe(self, query: str) -> "pyspark.sql.dataframe.DataFrame": da global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:db2://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "com.ibm.db2.jcc.DB2Driver" self.db2_c global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:postgresql://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "org.postgresql.Driver" self.co global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: ("username",secret.get("db_username")) db_password = secret.get("password",secret.get("db_password")) jdbc_driver_name = driver return db_url, db_username, global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: stgresql.Driver", "conn_string": "jdbc:postgresql://{host}:{port}/{dbname}", }, "oracle": { "driver": "oracle.jdbc.driver.Or global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: er.OracleDriver", "conn_string": "jdbc:oracle://{host}:{port}/{dbname}", }, "oracle_thin": { "conn_string": "jdbc:oracle:thi global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: "teradata": { "conn_string": "jdbc:teradata://{host}", "driver": "com.teradata.jdbc.TeraDriver", }, } def get_static_da global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: eate RDS DB Secret """ templated_secret = secretsmanager.SecretStringGenerator( secret_string_template=json.dumps( {"username": self.rd global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: nce_details.secret_length, ) rds_secret = secretsmanager.Secret( self.stack_, "RDS-Secret", generate_secret_string=templated_secret ) global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: etails.secret_json_key encrypted_password = self.secret_details.credentials.__dict__.get(secret_key) encryption_key = self.secret_details.encryptio global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ls))) else: templated_secret = secretsmanager.CfnSecret.GenerateSecretStringProperty( secret_string_template=json.dumps(self.secret_ global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: def create_secret(self,credentials): secret = secretsmanager.CfnSecret( self.stack_, self.secret_details.secret_name, description=s delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: h2" CLIENT_ID = 'SMTSBMENCI_eNCIAWSCOGNITO_CC_SI' CLIENT_SECRET = 'xelmTR10yjDm2fEtmYEZWsXiNFZI8iz19O8tAeiGQBt9OMU67ZbcsVzNyuRWyLoG' role_arn = cognito_mapping.get(block_code).get global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: edentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) cr global-sales-utility :: global_sales_script_utilities/glue/aws_utils.py :: t_secret_value(SecretId=secret_name) secret = secret_response["SecretString"] return secret except ClientError as e: print("Error Readi global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: rname",secret.get("db_username")) self.db_password = secret.get("password",secret.get("db_password")) self.host = secret.get("host",secret.get("db_host")) s global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: "user": self.db_username, "password": self.db_password, "dbtable": table_name, } class TeradataDatabaseManager(BaseDatabaseManager): global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: teradata.jdbc.TeraDriver" self.db_url = f"jdbc:teradata://{self.host}" def fetch_data_into_dataframe(self, query: str) -> "pyspark.sql.dataframe.DataFrame": da global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:db2://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "com.ibm.db2.jcc.DB2Driver" self.db2_c global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:postgresql://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "org.postgresql.Driver" self.co global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: ("username",secret.get("db_username")) db_password = secret.get("password",secret.get("db_password")) jdbc_driver_name = driver return db_url, db_username, global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: stgresql.Driver", "conn_string": "jdbc:postgresql://{host}:{port}/{dbname}", }, "oracle": { "driver": "oracle.jdbc.driver.Or global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: er.OracleDriver", "conn_string": "jdbc:oracle://{host}:{port}/{dbname}", }, "oracle_thin": { "conn_string": "jdbc:oracle:thi global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: "teradata": { "conn_string": "jdbc:teradata://{host}", "driver": "com.teradata.jdbc.TeraDriver", }, } def get_static_da global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: eate RDS DB Secret """ templated_secret = secretsmanager.SecretStringGenerator( secret_string_template=json.dumps( {"username": self.rd global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: nce_details.secret_length, ) rds_secret = secretsmanager.Secret( self.stack_, "RDS-Secret", generate_secret_string=templated_secret ) global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: etails.secret_json_key encrypted_password = self.secret_details.credentials.__dict__.get(secret_key) encryption_key = self.secret_details.encryptio global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ls))) else: templated_secret = secretsmanager.CfnSecret.GenerateSecretStringProperty( secret_string_template=json.dumps(self.secret_ global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: def create_secret(self,credentials): secret = secretsmanager.CfnSecret( self.stack_, self.secret_details.secret_name, description=s delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/apigateway/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class AWSSecretCredential(DataCredential): """Class for login credentials that are stored in AWS Secrets python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class AWSSecretCredential(DataCredential): """Class for login credentials that are stored in AWS Secrets python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class AWSSecretCredential(DataCredential): """Class for login credentials that are stored in AWS Secrets python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k oautils :: oautils/aws/secrets_manager.py :: Get two values from keys in the secret username, password = get_value('my_secret', 'my_key1', 'my_key2') # Get values from secret or keyring if secret doesn't work username = get oautils :: oautils/database.py :: .com", port=1025, username="my_user", password = "my_pass", connect_args = {"logmech": "LDAP"}, ) # Get a connection using specific keyring service info conn = get oautils :: oautils/database.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/db2.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_db2_service",kr_usern oautils :: oautils/ftp.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/ftp.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/hana.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/keyring_.py :: # Access teradata username and password username, password = get_value('teradata','username','teradata','password') # Reset keyring (delete current setup to allow for re-running ` oautils :: oautils/keyring_.py :: e and password for teradata service username, password = get_value('teradata','username', 'teradata', 'password') ``` This function is optimized to minimize keyring ca oautils :: oautils/keyring_.py :: ey, kr_password_key, **kwargs): username, password = get_user_pass(kwargs, kr_service, kr_username_key, kr_password_key) # Use username/password in function call oautils :: oautils/o365/graph_api.py :: "scope": scope, "client_secret": client_secret, "grant_type": "client_credentials", }, ) r.raise_for_s oautils :: oautils/oracle.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_oracle_service",kr_us oautils :: oautils/postgres.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_postgres_service",kr_ oautils :: oautils/redshift.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Connect to user.specified.host at port 1234 and database db conn = get_conn('user.specified.host',1234,'d oautils :: oautils/redshift.py :: er.specified.host',1234,'db', username="my_user", password = "my_pass") # Use established connection to get data as dataframe df = get_data('select * from my.table', conn) # Clos oautils :: oautils/sharepoint.py :: None or client_secret is None: client_id, client_secret = get_value(kr_service, kr_client_id_key, kr_service, kr_client_secret_key) log_fn(f"Getting SharePoint context oautils :: oautils/sqlserver.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_sql_service",kr_usern oautils :: oautils/tableau_api.py :: ss_token_name, "personal_access_token_secret": personal_access_token_secret, "site_name": site_name, "site_url": site_url, } } t oautils :: oautils/teradata.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_td_service",kr_userna delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: gistry_url": "npmRegistryUrl", "npm_token_secret": "npmTokenSecret", "outdir": "outdir", "package": "package", "package_manager": "packageManager", serverless-projen-projects :: serverless_projen_projects/patterns/common/spa/__init__.py :: is not None: self._values["npm_token_secret"] = npm_token_secret if outdir is not None: self._values["outdir"] = outdir if package is not N python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class AWSSecretCredential(DataCredential): """Class for login credentials that are stored in AWS Secrets python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k oautils :: oautils/aws/secrets_manager.py :: Get two values from keys in the secret username, password = get_value('my_secret', 'my_key1', 'my_key2') # Get values from secret or keyring if secret doesn't work username = get oautils :: oautils/database.py :: .com", port=1025, username="my_user", password = "my_pass", connect_args = {"logmech": "LDAP"}, ) # Get a connection using specific keyring service info conn = get oautils :: oautils/database.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/db2.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_db2_service",kr_usern oautils :: oautils/ftp.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/ftp.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/hana.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/keyring_.py :: # Access teradata username and password username, password = get_value('teradata','username','teradata','password') # Reset keyring (delete current setup to allow for re-running ` oautils :: oautils/keyring_.py :: e and password for teradata service username, password = get_value('teradata','username', 'teradata', 'password') ``` This function is optimized to minimize keyring ca oautils :: oautils/keyring_.py :: ey, kr_password_key, **kwargs): username, password = get_user_pass(kwargs, kr_service, kr_username_key, kr_password_key) # Use username/password in function call oautils :: oautils/o365/graph_api.py :: "scope": scope, "client_secret": client_secret, "grant_type": "client_credentials", }, ) r.raise_for_s oautils :: oautils/oracle.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_oracle_service",kr_us oautils :: oautils/postgres.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_postgres_service",kr_ oautils :: oautils/redshift.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Connect to user.specified.host at port 1234 and database db conn = get_conn('user.specified.host',1234,'d oautils :: oautils/redshift.py :: er.specified.host',1234,'db', username="my_user", password = "my_pass") # Use established connection to get data as dataframe df = get_data('select * from my.table', conn) # Clos oautils :: oautils/sharepoint.py :: None or client_secret is None: client_id, client_secret = get_value(kr_service, kr_client_id_key, kr_service, kr_client_secret_key) log_fn(f"Getting SharePoint context oautils :: oautils/sqlserver.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_sql_service",kr_usern oautils :: oautils/tableau_api.py :: ss_token_name, "personal_access_token_secret": personal_access_token_secret, "site_name": site_name, "site_url": site_url, } } t oautils :: oautils/teradata.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_td_service",kr_userna delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k oautils :: oautils/aws/secrets_manager.py :: Get two values from keys in the secret username, password = get_value('my_secret', 'my_key1', 'my_key2') # Get values from secret or keyring if secret doesn't work username = get oautils :: oautils/database.py :: .com", port=1025, username="my_user", password = "my_pass", connect_args = {"logmech": "LDAP"}, ) # Get a connection using specific keyring service info conn = get oautils :: oautils/database.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/db2.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_db2_service",kr_usern oautils :: oautils/ftp.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/ftp.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/hana.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/keyring_.py :: # Access teradata username and password username, password = get_value('teradata','username','teradata','password') # Reset keyring (delete current setup to allow for re-running ` oautils :: oautils/keyring_.py :: e and password for teradata service username, password = get_value('teradata','username', 'teradata', 'password') ``` This function is optimized to minimize keyring ca oautils :: oautils/keyring_.py :: ey, kr_password_key, **kwargs): username, password = get_user_pass(kwargs, kr_service, kr_username_key, kr_password_key) # Use username/password in function call oautils :: oautils/o365/graph_api.py :: "scope": scope, "client_secret": client_secret, "grant_type": "client_credentials", }, ) r.raise_for_s oautils :: oautils/oracle.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_oracle_service",kr_us oautils :: oautils/postgres.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_postgres_service",kr_ oautils :: oautils/redshift.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Connect to user.specified.host at port 1234 and database db conn = get_conn('user.specified.host',1234,'d oautils :: oautils/redshift.py :: er.specified.host',1234,'db', username="my_user", password = "my_pass") # Use established connection to get data as dataframe df = get_data('select * from my.table', conn) # Clos oautils :: oautils/sharepoint.py :: None or client_secret is None: client_id, client_secret = get_value(kr_service, kr_client_id_key, kr_service, kr_client_secret_key) log_fn(f"Getting SharePoint context oautils :: oautils/sqlserver.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_sql_service",kr_usern oautils :: oautils/tableau_api.py :: ss_token_name, "personal_access_token_secret": personal_access_token_secret, "site_name": site_name, "site_url": site_url, } } t oautils :: oautils/teradata.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_td_service",kr_userna delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class AWSSecretCredential(DataCredential): """Class for login credentials that are stored in AWS Secrets python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "us-east-1" # pylint: disable=invalid-name secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "us-east-1" # pylint: disable=invalid-name secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: h2" CLIENT_ID = 'SMTSBMENCI_eNCIAWSCOGNITO_CC_SI' CLIENT_SECRET = 'xelmTR10yjDm2fEtmYEZWsXiNFZI8iz19O8tAeiGQBt9OMU67ZbcsVzNyuRWyLoG' role_arn = cognito_mapping.get(block_code).get global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: edentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) cr global-sales-utility :: global_sales_script_utilities/glue/aws_utils.py :: t_secret_value(SecretId=secret_name) secret = secret_response["SecretString"] return secret except ClientError as e: print("Error Readi global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: rname",secret.get("db_username")) self.db_password = secret.get("password",secret.get("db_password")) self.host = secret.get("host",secret.get("db_host")) s global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: "user": self.db_username, "password": self.db_password, "dbtable": table_name, } class TeradataDatabaseManager(BaseDatabaseManager): global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: teradata.jdbc.TeraDriver" self.db_url = f"jdbc:teradata://{self.host}" def fetch_data_into_dataframe(self, query: str) -> "pyspark.sql.dataframe.DataFrame": da global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:db2://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "com.ibm.db2.jcc.DB2Driver" self.db2_c global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:postgresql://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "org.postgresql.Driver" self.co global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:sqlserver://{self.host}" self.jdbc_driver_name = "com.microsoft.sqlserver.jdbc.SQLServerDriver" def fetch_data_i global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: ("username",secret.get("db_username")) db_password = secret.get("password",secret.get("db_password")) jdbc_driver_name = driver return db_url, db_username, global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: stgresql.Driver", "conn_string": "jdbc:postgresql://{host}:{port}/{dbname}", }, "oracle": { "driver": "oracle.jdbc.driver.Or global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: er.OracleDriver", "conn_string": "jdbc:oracle://{host}:{port}/{dbname}", }, "oracle_thin": { "conn_string": "jdbc:oracle:thi global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: "teradata": { "conn_string": "jdbc:teradata://{host}", "driver": "com.teradata.jdbc.TeraDriver", }, } def get_static_da global-sales-utility :: global_sales_script_utilities/glue/salesforce_utils.py :: ient_id = self.config.get("clientId") client_secret = self.config.get("clientSecret") refresh_token = self.config.get("refreshToken") self.sales global-sales-utility :: global_sales_script_utilities/glue/salesforce_utils.py :: "client_id": client_id, "client_secret": client_secret, "refresh_token": refresh_token } url = f"{self global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: eate RDS DB Secret """ templated_secret = secretsmanager.SecretStringGenerator( secret_string_template=json.dumps( {"username": self.rd global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: nce_details.secret_length, ) rds_secret = secretsmanager.Secret( self.stack_, "RDS-Secret", generate_secret_string=templated_secret ) global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: etails.secret_json_key encrypted_password = self.secret_details.credentials.__dict__.get(secret_key) encryption_key = self.secret_details.encryptio global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ls))) else: templated_secret = secretsmanager.CfnSecret.GenerateSecretStringProperty( secret_string_template=json.dumps(self.secret_ global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: def create_secret(self,credentials): secret = secretsmanager.CfnSecret( self.stack_, self.secret_details.secret_name, description=s python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class EnvVarCredential(DataCredential): """Class for login credentials that are stored in environment va python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = os.environ[user_env_var] self.password = os.environ[password_env_var] class AWSSecretCredential(DataCredential): """Class for login credentials that are s python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k oarpt :: oarpt/test_report.py :: user = kr.get_value("sas", "username") passwd = kr.get_value("sas", "password") sftp_directory = f"/prd/sautoc/shared_reports/TOP_AnlsPerf/Report_Archive/TODPS_n oarpt :: oarpt/test_report.py :: user = kr.get_value("sas", "username") passwd = kr.get_value("sas", "password") sftp_directory = f"/prd/sautoc/shared_reports/TOP_AnlsPerf/Report_Archive/TODPS_n oarpt :: oarpt/archive/test_report.py :: user = kr.get_value("sas", "username") passwd = kr.get_value("sas", "password") sftp_directory = f"/prd/sautoc/shared_reports/TOP_AnlsPerf/Report_Archive/TODPS_n delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "us-east-1" # pylint: disable=invalid-name secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) oarpt :: oarpt/archive/test_report.py :: user = kr.get_value("sas", "username") passwd = kr.get_value("sas", "password") sftp_directory = f"/prd/sautoc/shared_reports/TOP_AnlsPerf/Report_Archive/TODPS_n schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io_sio.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io_sio.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io_sio.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io_sio.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io_sio.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io_sio.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) schedule-impact-optimization-engine :: sio_engine/data_io_sio.py :: except ClientError as e: raise e secret = get_secret_value_response["SecretString"] return json.loads(secret) def connect_to_db(secret): """Connect schedule-impact-optimization-engine :: sio_engine/data_io_sio.py :: t["database"] username = secret["user"] password = secret["password"] port = secret["port"] conn = psycopg2.connect( host=host, database=database, us schedule-impact-optimization-engine :: sio_engine/data_io_sio.py :: = {} try: # Get the secret secret = get_secret(secret_name, region_name) # Connect to the database conn = connect_to_db(secret) delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k oarpt :: oarpt/archive/test_report.py :: user = kr.get_value("sas", "username") passwd = kr.get_value("sas", "password") sftp_directory = f"/prd/sautoc/shared_reports/TOP_AnlsPerf/Report_Archive/TODPS_n delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class EnvVarCredential(DataCredential): """Class for login credentials that are stored in environment va python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = os.environ[user_env_var] self.password = os.environ[password_env_var] class AWSSecretCredential(DataCredential): """Class for login credentials that are s python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: h2" CLIENT_ID = 'SMTSBMENCI_eNCIAWSCOGNITO_CC_SI' CLIENT_SECRET = 'xelmTR10yjDm2fEtmYEZWsXiNFZI8iz19O8tAeiGQBt9OMU67ZbcsVzNyuRWyLoG' role_arn = cognito_mapping.get(block_code).get global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: edentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) cr global-sales-utility :: global_sales_script_utilities/glue/aws_utils.py :: t_secret_value(SecretId=secret_name) secret = secret_response["SecretString"] return secret except ClientError as e: print("Error Readi global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: rname",secret.get("db_username")) self.db_password = secret.get("password",secret.get("db_password")) self.host = secret.get("host",secret.get("db_host")) s global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: "user": self.db_username, "password": self.db_password, "dbtable": table_name, } class TeradataDatabaseManager(BaseDatabaseManager): global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: teradata.jdbc.TeraDriver" self.db_url = f"jdbc:teradata://{self.host}" def fetch_data_into_dataframe(self, query: str) -> "pyspark.sql.dataframe.DataFrame": da global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:db2://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "com.ibm.db2.jcc.DB2Driver" self.db2_c global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:postgresql://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "org.postgresql.Driver" self.co global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:sqlserver://{self.host}" self.jdbc_driver_name = "com.microsoft.sqlserver.jdbc.SQLServerDriver" def fetch_data_i global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: ("username",secret.get("db_username")) db_password = secret.get("password",secret.get("db_password")) jdbc_driver_name = driver return db_url, db_username, global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: stgresql.Driver", "conn_string": "jdbc:postgresql://{host}:{port}/{dbname}", }, "oracle": { "driver": "oracle.jdbc.driver.Or global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: er.OracleDriver", "conn_string": "jdbc:oracle://{host}:{port}/{dbname}", }, "oracle_thin": { "conn_string": "jdbc:oracle:thi global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: "teradata": { "conn_string": "jdbc:teradata://{host}", "driver": "com.teradata.jdbc.TeraDriver", }, } def get_static_da global-sales-utility :: global_sales_script_utilities/glue/salesforce_utils.py :: ient_id = self.config.get("clientId") client_secret = self.config.get("clientSecret") refresh_token = self.config.get("refreshToken") self.sales global-sales-utility :: global_sales_script_utilities/glue/salesforce_utils.py :: "client_id": client_id, "client_secret": client_secret, "refresh_token": refresh_token } url = f"{self global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: eate RDS DB Secret """ templated_secret = secretsmanager.SecretStringGenerator( secret_string_template=json.dumps( {"username": self.rd global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: nce_details.secret_length, ) rds_secret = secretsmanager.Secret( self.stack_, "RDS-Secret", generate_secret_string=templated_secret ) global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: etails.secret_json_key encrypted_password = self.secret_details.credentials.__dict__.get(secret_key) encryption_key = self.secret_details.encryptio global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ls))) else: templated_secret = secretsmanager.CfnSecret.GenerateSecretStringProperty( secret_string_template=json.dumps(self.secret_ global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: def create_secret(self,credentials): secret = secretsmanager.CfnSecret( self.stack_, self.secret_details.secret_name, description=s delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "us-east-1" # pylint: disable=invalid-name secret = get_secret_from_aws(secret_name, region_name) print(secret) python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class EnvVarCredential(DataCredential): """Class for login credentials that are stored in environment va python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = os.environ[user_env_var] self.password = os.environ[password_env_var] class AWSSecretCredential(DataCredential): """Class for login credentials that are s python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: h2" CLIENT_ID = 'SMTSBMENCI_eNCIAWSCOGNITO_CC_SI' CLIENT_SECRET = 'xelmTR10yjDm2fEtmYEZWsXiNFZI8iz19O8tAeiGQBt9OMU67ZbcsVzNyuRWyLoG' role_arn = cognito_mapping.get(block_code).get global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: edentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) cr global-sales-utility :: global_sales_script_utilities/glue/aws_utils.py :: t_secret_value(SecretId=secret_name) secret = secret_response["SecretString"] return secret except ClientError as e: print("Error Readi global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: rname",secret.get("db_username")) self.db_password = secret.get("password",secret.get("db_password")) self.host = secret.get("host",secret.get("db_host")) s global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: "user": self.db_username, "password": self.db_password, "dbtable": table_name, } class TeradataDatabaseManager(BaseDatabaseManager): global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: teradata.jdbc.TeraDriver" self.db_url = f"jdbc:teradata://{self.host}" def fetch_data_into_dataframe(self, query: str) -> "pyspark.sql.dataframe.DataFrame": da global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:db2://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "com.ibm.db2.jcc.DB2Driver" self.db2_c global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:postgresql://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "org.postgresql.Driver" self.co global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:sqlserver://{self.host}" self.jdbc_driver_name = "com.microsoft.sqlserver.jdbc.SQLServerDriver" def fetch_data_i global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: ("username",secret.get("db_username")) db_password = secret.get("password",secret.get("db_password")) jdbc_driver_name = driver return db_url, db_username, global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: stgresql.Driver", "conn_string": "jdbc:postgresql://{host}:{port}/{dbname}", }, "oracle": { "driver": "oracle.jdbc.driver.Or global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: er.OracleDriver", "conn_string": "jdbc:oracle://{host}:{port}/{dbname}", }, "oracle_thin": { "conn_string": "jdbc:oracle:thi global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: "teradata": { "conn_string": "jdbc:teradata://{host}", "driver": "com.teradata.jdbc.TeraDriver", }, } def get_static_da global-sales-utility :: global_sales_script_utilities/glue/salesforce_utils.py :: ient_id = self.config.get("clientId") client_secret = self.config.get("clientSecret") refresh_token = self.config.get("refreshToken") self.sales global-sales-utility :: global_sales_script_utilities/glue/salesforce_utils.py :: "client_id": client_id, "client_secret": client_secret, "refresh_token": refresh_token } url = f"{self global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: eate RDS DB Secret """ templated_secret = secretsmanager.SecretStringGenerator( secret_string_template=json.dumps( {"username": self.rd global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: nce_details.secret_length, ) rds_secret = secretsmanager.Secret( self.stack_, "RDS-Secret", generate_secret_string=templated_secret ) global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: etails.secret_json_key encrypted_password = self.secret_details.credentials.__dict__.get(secret_key) encryption_key = self.secret_details.encryptio global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ls))) else: templated_secret = secretsmanager.CfnSecret.GenerateSecretStringProperty( secret_string_template=json.dumps(self.secret_ global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: def create_secret(self,credentials): secret = secretsmanager.CfnSecret( self.stack_, self.secret_details.secret_name, description=s global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: h2" CLIENT_ID = 'SMTSBMENCI_eNCIAWSCOGNITO_CC_SI' CLIENT_SECRET = 'xelmTR10yjDm2fEtmYEZWsXiNFZI8iz19O8tAeiGQBt9OMU67ZbcsVzNyuRWyLoG' role_arn = cognito_mapping.get(block_code).get global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: edentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) cr global-sales-utility :: global_sales_script_utilities/glue/aws_utils.py :: t_secret_value(SecretId=secret_name) secret = secret_response["SecretString"] return secret except ClientError as e: print("Error Readi global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: rname",secret.get("db_username")) self.db_password = secret.get("password",secret.get("db_password")) self.host = secret.get("host",secret.get("db_host")) s global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: "user": self.db_username, "password": self.db_password, "dbtable": table_name, } class TeradataDatabaseManager(BaseDatabaseManager): global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: teradata.jdbc.TeraDriver" self.db_url = f"jdbc:teradata://{self.host}" def fetch_data_into_dataframe(self, query: str) -> "pyspark.sql.dataframe.DataFrame": da global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:db2://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "com.ibm.db2.jcc.DB2Driver" self.db2_c global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:postgresql://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "org.postgresql.Driver" self.co global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:sqlserver://{self.host}" self.jdbc_driver_name = "com.microsoft.sqlserver.jdbc.SQLServerDriver" def fetch_data_i global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: ("username",secret.get("db_username")) db_password = secret.get("password",secret.get("db_password")) jdbc_driver_name = driver return db_url, db_username, global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: stgresql.Driver", "conn_string": "jdbc:postgresql://{host}:{port}/{dbname}", }, "oracle": { "driver": "oracle.jdbc.driver.Or global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: er.OracleDriver", "conn_string": "jdbc:oracle://{host}:{port}/{dbname}", }, "oracle_thin": { "conn_string": "jdbc:oracle:thi global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: "teradata": { "conn_string": "jdbc:teradata://{host}", "driver": "com.teradata.jdbc.TeraDriver", }, } def get_static_da global-sales-utility :: global_sales_script_utilities/glue/salesforce_utils.py :: ient_id = self.config.get("clientId") client_secret = self.config.get("clientSecret") refresh_token = self.config.get("refreshToken") self.sales global-sales-utility :: global_sales_script_utilities/glue/salesforce_utils.py :: "client_id": client_id, "client_secret": client_secret, "refresh_token": refresh_token } url = f"{self global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: eate RDS DB Secret """ templated_secret = secretsmanager.SecretStringGenerator( secret_string_template=json.dumps( {"username": self.rd global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: nce_details.secret_length, ) rds_secret = secretsmanager.Secret( self.stack_, "RDS-Secret", generate_secret_string=templated_secret ) global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: etails.secret_json_key encrypted_password = self.secret_details.credentials.__dict__.get(secret_key) encryption_key = self.secret_details.encryptio global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ls))) else: templated_secret = secretsmanager.CfnSecret.GenerateSecretStringProperty( secret_string_template=json.dumps(self.secret_ global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: def create_secret(self,credentials): secret = secretsmanager.CfnSecret( self.stack_, self.secret_details.secret_name, description=s global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: h2" CLIENT_ID = 'SMTSBMENCI_eNCIAWSCOGNITO_CC_SI' CLIENT_SECRET = 'xelmTR10yjDm2fEtmYEZWsXiNFZI8iz19O8tAeiGQBt9OMU67ZbcsVzNyuRWyLoG' role_arn = cognito_mapping.get(block_code).get global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: edentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) cr global-sales-utility :: global_sales_script_utilities/glue/aws_utils.py :: t_secret_value(SecretId=secret_name) secret = secret_response["SecretString"] return secret except ClientError as e: print("Error Readi global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: rname",secret.get("db_username")) self.db_password = secret.get("password",secret.get("db_password")) self.host = secret.get("host",secret.get("db_host")) s global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: "user": self.db_username, "password": self.db_password, "dbtable": table_name, } class TeradataDatabaseManager(BaseDatabaseManager): global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: teradata.jdbc.TeraDriver" self.db_url = f"jdbc:teradata://{self.host}" def fetch_data_into_dataframe(self, query: str) -> "pyspark.sql.dataframe.DataFrame": da global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:db2://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "com.ibm.db2.jcc.DB2Driver" self.db2_c global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:postgresql://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "org.postgresql.Driver" self.co global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:sqlserver://{self.host}" self.jdbc_driver_name = "com.microsoft.sqlserver.jdbc.SQLServerDriver" def fetch_data_i global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: ("username",secret.get("db_username")) db_password = secret.get("password",secret.get("db_password")) jdbc_driver_name = driver return db_url, db_username, global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: stgresql.Driver", "conn_string": "jdbc:postgresql://{host}:{port}/{dbname}", }, "oracle": { "driver": "oracle.jdbc.driver.Or global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: er.OracleDriver", "conn_string": "jdbc:oracle://{host}:{port}/{dbname}", }, "oracle_thin": { "conn_string": "jdbc:oracle:thi global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: "teradata": { "conn_string": "jdbc:teradata://{host}", "driver": "com.teradata.jdbc.TeraDriver", }, } def get_static_da global-sales-utility :: global_sales_script_utilities/glue/salesforce_utils.py :: ient_id = self.config.get("clientId") client_secret = self.config.get("clientSecret") refresh_token = self.config.get("refreshToken") self.sales global-sales-utility :: global_sales_script_utilities/glue/salesforce_utils.py :: "client_id": client_id, "client_secret": client_secret, "refresh_token": refresh_token } url = f"{self global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: eate RDS DB Secret """ templated_secret = secretsmanager.SecretStringGenerator( secret_string_template=json.dumps( {"username": self.rd global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: nce_details.secret_length, ) rds_secret = secretsmanager.Secret( self.stack_, "RDS-Secret", generate_secret_string=templated_secret ) global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: etails.secret_json_key encrypted_password = self.secret_details.credentials.__dict__.get(secret_key) encryption_key = self.secret_details.encryptio global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ls))) else: templated_secret = secretsmanager.CfnSecret.GenerateSecretStringProperty( secret_string_template=json.dumps(self.secret_ global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: def create_secret(self,credentials): secret = secretsmanager.CfnSecret( self.stack_, self.secret_details.secret_name, description=s global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: h2" CLIENT_ID = 'SMTSBMENCI_eNCIAWSCOGNITO_CC_SI' CLIENT_SECRET = 'xelmTR10yjDm2fEtmYEZWsXiNFZI8iz19O8tAeiGQBt9OMU67ZbcsVzNyuRWyLoG' role_arn = cognito_mapping.get(block_code).get global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: edentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) cr global-sales-utility :: global_sales_script_utilities/glue/aws_utils.py :: t_secret_value(SecretId=secret_name) secret = secret_response["SecretString"] return secret except ClientError as e: print("Error Readi global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: rname",secret.get("db_username")) self.db_password = secret.get("password",secret.get("db_password")) self.host = secret.get("host",secret.get("db_host")) s global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: "user": self.db_username, "password": self.db_password, "dbtable": table_name, } class TeradataDatabaseManager(BaseDatabaseManager): global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: teradata.jdbc.TeraDriver" self.db_url = f"jdbc:teradata://{self.host}" def fetch_data_into_dataframe(self, query: str) -> "pyspark.sql.dataframe.DataFrame": da global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:db2://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "com.ibm.db2.jcc.DB2Driver" self.db2_c global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:postgresql://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "org.postgresql.Driver" self.co global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:sqlserver://{self.host}" self.jdbc_driver_name = "com.microsoft.sqlserver.jdbc.SQLServerDriver" def fetch_data_i global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: ("username",secret.get("db_username")) db_password = secret.get("password",secret.get("db_password")) jdbc_driver_name = driver return db_url, db_username, global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: stgresql.Driver", "conn_string": "jdbc:postgresql://{host}:{port}/{dbname}", }, "oracle": { "driver": "oracle.jdbc.driver.Or global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: er.OracleDriver", "conn_string": "jdbc:oracle://{host}:{port}/{dbname}", }, "oracle_thin": { "conn_string": "jdbc:oracle:thi global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: "teradata": { "conn_string": "jdbc:teradata://{host}", "driver": "com.teradata.jdbc.TeraDriver", }, } def get_static_da global-sales-utility :: global_sales_script_utilities/glue/salesforce_utils.py :: ient_id = self.config.get("clientId") client_secret = self.config.get("clientSecret") refresh_token = self.config.get("refreshToken") self.sales global-sales-utility :: global_sales_script_utilities/glue/salesforce_utils.py :: "client_id": client_id, "client_secret": client_secret, "refresh_token": refresh_token } url = f"{self global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: eate RDS DB Secret """ templated_secret = secretsmanager.SecretStringGenerator( secret_string_template=json.dumps( {"username": self.rd global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: nce_details.secret_length, ) rds_secret = secretsmanager.Secret( self.stack_, "RDS-Secret", generate_secret_string=templated_secret ) global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: etails.secret_json_key encrypted_password = self.secret_details.credentials.__dict__.get(secret_key) encryption_key = self.secret_details.encryptio global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ls))) else: templated_secret = secretsmanager.CfnSecret.GenerateSecretStringProperty( secret_string_template=json.dumps(self.secret_ global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: def create_secret(self,credentials): secret = secretsmanager.CfnSecret( self.stack_, self.secret_details.secret_name, description=s delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "us-east-1" # pylint: disable=invalid-name secret = get_secret_from_aws(secret_name, region_name) print(secret) delta-aws-cdk-python-bundler-test :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk-python-bundler-test :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k global-sales-cdk-framework :: cdk_framework/utils/code/lambda_layer/python/service/loyalty_service.py :: t_value["loyalty_client_id"] self.loyalty_client_secret = secret_value["loyalty_client_secret"] self.member_details = {} self._logger_ = logger def upg python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class EnvVarCredential(DataCredential): """Class for login credentials that are stored in environment va python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = os.environ[user_env_var] self.password = os.environ[password_env_var] class AWSSecretCredential(DataCredential): """Class for login credentials that are s python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "us-east-1" # pylint: disable=invalid-name secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "us-east-1" # pylint: disable=invalid-name secret = get_secret_from_aws(secret_name, region_name) print(secret) oarpt :: oarpt/archive/test_report.py :: user = kr.get_value("sas", "username") passwd = kr.get_value("sas", "password") sftp_directory = f"/prd/sautoc/shared_reports/TOP_AnlsPerf/Report_Archive/TODPS_n delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k oarpt :: oarpt/archive/test_report.py :: user = kr.get_value("sas", "username") passwd = kr.get_value("sas", "password") sftp_directory = f"/prd/sautoc/shared_reports/TOP_AnlsPerf/Report_Archive/TODPS_n delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk-python-bundler-test :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk-python-bundler-test :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "us-east-1" # pylint: disable=invalid-name secret = get_secret_from_aws(secret_name, region_name) print(secret) delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "us-east-1" # pylint: disable=invalid-name secret = get_secret_from_aws(secret_name, region_name) print(secret) delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: h2" CLIENT_ID = 'SMTSBMENCI_eNCIAWSCOGNITO_CC_SI' CLIENT_SECRET = 'xelmTR10yjDm2fEtmYEZWsXiNFZI8iz19O8tAeiGQBt9OMU67ZbcsVzNyuRWyLoG' role_arn = cognito_mapping.get(block_code).get global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: edentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) cr global-sales-utility :: global_sales_script_utilities/glue/aws_utils.py :: t_secret_value(SecretId=secret_name) secret = secret_response["SecretString"] return secret except ClientError as e: print("Error Readi global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: rname",secret.get("db_username")) self.db_password = secret.get("password",secret.get("db_password")) self.host = secret.get("host",secret.get("db_host")) s global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: "user": self.db_username, "password": self.db_password, "dbtable": table_name, } class TeradataDatabaseManager(BaseDatabaseManager): global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: teradata.jdbc.TeraDriver" self.db_url = f"jdbc:teradata://{self.host}" def fetch_data_into_dataframe(self, query: str) -> "pyspark.sql.dataframe.DataFrame": da global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:db2://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "com.ibm.db2.jcc.DB2Driver" self.db2_c global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:postgresql://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "org.postgresql.Driver" self.co global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:sqlserver://{self.host}" self.jdbc_driver_name = "com.microsoft.sqlserver.jdbc.SQLServerDriver" def fetch_data_i global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: ("username",secret.get("db_username")) db_password = secret.get("password",secret.get("db_password")) jdbc_driver_name = driver return db_url, db_username, global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: stgresql.Driver", "conn_string": "jdbc:postgresql://{host}:{port}/{dbname}", }, "oracle": { "driver": "oracle.jdbc.driver.Or global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: er.OracleDriver", "conn_string": "jdbc:oracle://{host}:{port}/{dbname}", }, "oracle_thin": { "conn_string": "jdbc:oracle:thi global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: "teradata": { "conn_string": "jdbc:teradata://{host}", "driver": "com.teradata.jdbc.TeraDriver", }, } def get_static_da global-sales-utility :: global_sales_script_utilities/glue/salesforce_utils.py :: ient_id = self.config.get("clientId") client_secret = self.config.get("clientSecret") refresh_token = self.config.get("refreshToken") self.sales global-sales-utility :: global_sales_script_utilities/glue/salesforce_utils.py :: "client_id": client_id, "client_secret": client_secret, "refresh_token": refresh_token } url = f"{self global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: eate RDS DB Secret """ templated_secret = secretsmanager.SecretStringGenerator( secret_string_template=json.dumps( {"username": self.rd global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: nce_details.secret_length, ) rds_secret = secretsmanager.Secret( self.stack_, "RDS-Secret", generate_secret_string=templated_secret ) global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: etails.secret_json_key encrypted_password = self.secret_details.credentials.__dict__.get(secret_key) encryption_key = self.secret_details.encryptio global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ls))) else: templated_secret = secretsmanager.CfnSecret.GenerateSecretStringProperty( secret_string_template=json.dumps(self.secret_ global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: def create_secret(self,credentials): secret = secretsmanager.CfnSecret( self.stack_, self.secret_details.secret_name, description=s delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k python-app-utilities :: utilities/data_access/data_credentials.py :: assword.""" self.user = user self.password = password class EnvVarCredential(DataCredential): """Class for login credentials that are stored in environment va python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = os.environ[user_env_var] self.password = os.environ[password_env_var] class AWSSecretCredential(DataCredential): """Class for login credentials that are s python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: # noqa: E501 python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k oautils :: oautils/aws/secrets_manager.py :: Get two values from keys in the secret username, password = get_value('my_secret', 'my_key1', 'my_key2') # Get values from secret or keyring if secret doesn't work username = get oautils :: oautils/database.py :: .com", port=1025, username="my_user", password = "my_pass", connect_args = {"logmech": "LDAP"}, ) # Get a connection using specific keyring service info conn = get oautils :: oautils/database.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/db2.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_db2_service",kr_usern oautils :: oautils/ftp.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/ftp.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/hana.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/keyring_.py :: # Access teradata username and password username, password = get_value('teradata','username','teradata','password') # Reset keyring (delete current setup to allow for re-running ` oautils :: oautils/keyring_.py :: e and password for teradata service username, password = get_value('teradata','username', 'teradata', 'password') ``` This function is optimized to minimize keyring ca oautils :: oautils/keyring_.py :: ey, kr_password_key, **kwargs): username, password = get_user_pass(kwargs, kr_service, kr_username_key, kr_password_key) # Use username/password in function call oautils :: oautils/o365/graph_api.py :: "scope": scope, "client_secret": client_secret, "grant_type": "client_credentials", }, ) r.raise_for_s oautils :: oautils/oracle.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_oracle_service",kr_us oautils :: oautils/postgres.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_postgres_service",kr_ oautils :: oautils/redshift.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Connect to user.specified.host at port 1234 and database db conn = get_conn('user.specified.host',1234,'d oautils :: oautils/redshift.py :: er.specified.host',1234,'db', username="my_user", password = "my_pass") # Use established connection to get data as dataframe df = get_data('select * from my.table', conn) # Clos oautils :: oautils/sharepoint.py :: None or client_secret is None: client_id, client_secret = get_value(kr_service, kr_client_id_key, kr_service, kr_client_secret_key) log_fn(f"Getting SharePoint context oautils :: oautils/sqlserver.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_sql_service",kr_usern oautils :: oautils/tableau_api.py :: ss_token_name, "personal_access_token_secret": personal_access_token_secret, "site_name": site_name, "site_url": site_url, } } t oautils :: oautils/teradata.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_td_service",kr_userna delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "us-east-1" # pylint: disable=invalid-name secret = get_secret_from_aws(secret_name, region_name) print(secret) crew-duties-engine :: crew_duties_engine/analysis/insight_attachments_db.py :: = database self.user = user self.password = password self.sslmode = sslmode @contextlib.contextmanager def _get_conn(self): """Context man delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: h2" CLIENT_ID = 'SMTSBMENCI_eNCIAWSCOGNITO_CC_SI' CLIENT_SECRET = 'xelmTR10yjDm2fEtmYEZWsXiNFZI8iz19O8tAeiGQBt9OMU67ZbcsVzNyuRWyLoG' role_arn = cognito_mapping.get(block_code).get global-sales-utility :: global_sales_script_utilities/common/cogniro_creds.py :: edentials = assume_role_session.get_credentials() access_key = credentials.access_key secret_key = credentials.secret_key token=credentials.token print(access_key) print(token) cr global-sales-utility :: global_sales_script_utilities/glue/aws_utils.py :: t_secret_value(SecretId=secret_name) secret = secret_response["SecretString"] return secret except ClientError as e: print("Error Readi global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: rname",secret.get("db_username")) self.db_password = secret.get("password",secret.get("db_password")) self.host = secret.get("host",secret.get("db_host")) s global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: "user": self.db_username, "password": self.db_password, "dbtable": table_name, } class TeradataDatabaseManager(BaseDatabaseManager): global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: teradata.jdbc.TeraDriver" self.db_url = f"jdbc:teradata://{self.host}" def fetch_data_into_dataframe(self, query: str) -> "pyspark.sql.dataframe.DataFrame": da global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:db2://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "com.ibm.db2.jcc.DB2Driver" self.db2_c global-sales-utility :: global_sales_script_utilities/glue/glue_db_utils.py :: secret_id, glue_context) self.db_url = f"jdbc:postgresql://{self.host}:{self.port}/{self.db_name}" self.jdbc_driver_name = "org.postgresql.Driver" self.co global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: ("username",secret.get("db_username")) db_password = secret.get("password",secret.get("db_password")) jdbc_driver_name = driver return db_url, db_username, global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: stgresql.Driver", "conn_string": "jdbc:postgresql://{host}:{port}/{dbname}", }, "oracle": { "driver": "oracle.jdbc.driver.Or global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: er.OracleDriver", "conn_string": "jdbc:oracle://{host}:{port}/{dbname}", }, "oracle_thin": { "conn_string": "jdbc:oracle:thi global-sales-utility :: global_sales_script_utilities/glue/glue_utils.py :: "teradata": { "conn_string": "jdbc:teradata://{host}", "driver": "com.teradata.jdbc.TeraDriver", }, } def get_static_da global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: eate RDS DB Secret """ templated_secret = secretsmanager.SecretStringGenerator( secret_string_template=json.dumps( {"username": self.rd global-sales-utility :: global_sales_stack_utilities/aws_rds/rds_stack_utils.py :: nce_details.secret_length, ) rds_secret = secretsmanager.Secret( self.stack_, "RDS-Secret", generate_secret_string=templated_secret ) global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: tails["secretJsonKey"] encrypted_password = secret_details["credentials"][secret_key] encryption_key = self.deployment_env["encryption_key"] global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: "]))) else: templated_secret = secretsmanager.CfnSecret.GenerateSecretStringProperty( secret_string_template=json.dumps(secret_detai global-sales-utility :: global_sales_stack_utilities/aws_secret/secret_stack_utils.py :: ecret(self, secret_details, credentials): secret = secretsmanager.CfnSecret( self, secret_details["secret_name"], description=secret_det delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k crew-duties-engine :: crew_duties_engine/analysis/insight_attachments_db.py :: = database self.user = user self.password = password self.sslmode = sslmode @contextlib.contextmanager def _get_conn(self): """Context man delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "us-east-1" # pylint: disable=invalid-name secret = get_secret_from_aws(secret_name, region_name) print(secret) crew-duties-engine :: crew_duties_engine/analysis/insight_attachments_db.py :: = database self.user = user self.password = password self.sslmode = sslmode @contextlib.contextmanager def _get_conn(self): """Context man delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k crew-duties-engine :: crew_duties_engine/analysis/insight_attachments_db.py :: = database self.user = user self.password = password self.sslmode = sslmode @contextlib.contextmanager def _get_conn(self): """Context man delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: raise e secret_j python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "us-east-1" # pylint: disable=invalid-name secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "us-east-1" # pylint: disable=invalid-name secret = get_secret_from_aws(secret_name, region_name) print(secret) delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "us-east-1" # pylint: disable=invalid-name secret = get_secret_from_aws(secret_name, region_name) print(secret) flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "us-east-1" # pylint: disable=invalid-name secret = get_secret_from_aws(secret_name, region_name) print(secret) crew-duties-engine :: crew_duties_engine/analysis/insight_attachments_db.py :: = database self.user = user self.password = password self.sslmode = sslmode @contextlib.contextmanager def _get_conn(self): """Context man delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k crew-duties-engine :: crew_duties_engine/analysis/insight_attachments_db.py :: = database self.user = user self.password = password self.sslmode = sslmode @contextlib.contextmanager def _get_conn(self): """Context man delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: raise e secret_j python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "us-east-1" # pylint: disable=invalid-name secret = get_secret_from_aws(secret_name, region_name) print(secret) crew-duties-engine :: crew_duties_engine/analysis/insight_attachments_db.py :: = database self.user = user self.password = password self.sslmode = sslmode @contextlib.contextmanager def _get_conn(self): """Context man delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: raise e secret_j python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su crew-duties-engine :: crew_duties_engine/analysis/insight_attachments_db.py :: = database self.user = user self.password = password self.sslmode = sslmode @contextlib.contextmanager def _get_conn(self): """Context man delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: raise e secret_j python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: raise e secret_j python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k oautils :: oautils/aws/secrets_manager.py :: Get two values from keys in the secret username, password = get_value('my_secret', 'my_key1', 'my_key2') # Get values from secret or keyring if secret doesn't work username = get oautils :: oautils/database.py :: .com", port=1025, username="my_user", password = "my_pass", connect_args = {"logmech": "LDAP"}, ) # Get a connection using specific keyring service info conn = get oautils :: oautils/database.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/db2.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_db2_service",kr_usern oautils :: oautils/ftp.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/ftp.py :: sword is None: try: username, password = get_value(kr_service, kr_username_key, kr_service, kr_password_key) except Exception as e: log_fn(" oautils :: oautils/hana.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_hana_service",kr_user oautils :: oautils/keyring_.py :: # Access teradata username and password username, password = get_value('teradata','username','teradata','password') # Reset keyring (delete current setup to allow for re-running ` oautils :: oautils/keyring_.py :: e and password for teradata service username, password = get_value('teradata','username', 'teradata', 'password') ``` This function is optimized to minimize keyring ca oautils :: oautils/keyring_.py :: ey, kr_password_key, **kwargs): username, password = get_user_pass(kwargs, kr_service, kr_username_key, kr_password_key) # Use username/password in function call oautils :: oautils/o365/graph_api.py :: "scope": scope, "client_secret": client_secret, "grant_type": "client_credentials", }, ) r.raise_for_s oautils :: oautils/oracle.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_oracle_service",kr_us oautils :: oautils/postgres.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_postgres_service",kr_ oautils :: oautils/redshift.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Connect to user.specified.host at port 1234 and database db conn = get_conn('user.specified.host',1234,'d oautils :: oautils/redshift.py :: er.specified.host',1234,'db', username="my_user", password = "my_pass") # Use established connection to get data as dataframe df = get_data('select * from my.table', conn) # Clos oautils :: oautils/sharepoint.py :: None or client_secret is None: client_id, client_secret = get_value(kr_service, kr_client_id_key, kr_service, kr_client_secret_key) log_fn(f"Getting SharePoint context oautils :: oautils/sqlserver.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_sql_service",kr_usern oautils :: oautils/tableau_api.py :: ss_token_name, "personal_access_token_secret": personal_access_token_secret, "site_name": site_name, "site_url": site_url, } } t oautils :: oautils/teradata.py :: and password conn = get_conn(username="my_user", password = "my_pass") # Get a connection using specific keyring service info conn = get_conn(kr_service="my_td_service",kr_userna delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k python-app-utilities :: utilities/data_access/data_credentials.py :: client_id = self.credential.user client_secret = self.credential.password if not client_id or not client_secret: raise ValueError( python-app-utilities :: utilities/data_access/data_credentials.py :: "client_id": client_id, "client_secret": client_secret, }, headers={"Content-Type": "application/x-www-form-urlencoded"}, python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: raise e secret_j python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su flight-schedule-utilities :: schedule/data_tools/accessors/aws.py :: Defaults to None. """ self.access_key = access_key self.secret_key = secret_key self.bucket_name = bucket_name self.region_name = reg flight-schedule-utilities :: schedule/data_tools/accessors/mssql.py :: er = server self.user = user self.password = password self.database = database self.driver = "{SQL Server}" self.conn = None self.cu flight-schedule-utilities :: schedule/data_tools/accessors/postgres.py :: = database self.user = user self.password = password def connect(self): """Connect to the PostgreSQL database. Raises: ------ flight-schedule-utilities :: schedule/data_tools/accessors/teradata.py :: host = host self.user = user self.password = password self.database = database self.conn = None self.cursor = None def connect(self): flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: Decrypts secret using the associated KMS key. secret = get_secret_value_response["SecretString"] return json.loads(secret) if __name__ == "__main__": # mgt_finder, tu flight-schedule-utilities :: schedule/data_tools/aws_secret_manager.py :: = "us-east-1" # pylint: disable=invalid-name secret = get_secret_from_aws(secret_name, region_name) print(secret) delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: such as Dr., Mr., Mrs., or Miss. ''' PASSWORD = "PASSWORD" '''An alphanumeric string that is used as a password, such as "*very20special#pass*".''' PHONE = "PH delta-aws-cdk :: delta/aws_cdk_lib/aws/pii_type/__init__.py :: dress assigned to a network interface.''' AWS_ACCESS_KEY = "AWS_ACCESS_KEY" '''A unique identifier that's associated with a secret access key. You use the access k python-app-utilities :: utilities/data_access/data_credentials.py :: client_id = self.credential.user client_secret = self.credential.password if not client_id or not client_secret: raise ValueError( python-app-utilities :: utilities/data_access/data_credentials.py :: "client_id": client_id, "client_secret": client_secret, }, headers={"Content-Type": "application/x-www-form-urlencoded"}, python-app-utilities :: utilities/data_access/data_credentials.py :: f.region_name ) try: secret = client.get_secret_value(SecretId=self.secret_name) except ClientError as e: raise e secret_j python-app-utilities :: utilities/data_access/data_credentials.py :: self.user = secret_json["user"] self.password = secret_json["password"] class DataCredentialFactory(ClassFactory): """Factory class for DataCredential and its su