db/python/tables/project.py
def _read_secret(self, project_id: str, secret_name: str):
        """Reads the latest version of a GCP Secret Manager secret.
        Returns None if the secret doesn't exist."""

        secret_manager = self._get_secret_manager_client()
        secret_path = secret_manager.secret_path(project_id, secret_name)

        response = secret_manager.access_secret_version(
            request={'name': f'{secret_path}/versions/latest'}
        )

        return response.payload.data.decode('UTF-8')
Reads the latest version of a GCP Secret Manager secret.
        Returns None if the secret doesn't exist.
Reads the latest version of a GCP Secret Manager secret.
Returns None if the secret doesn't exist.
Reads the latest version of a GCP Secret Manager secret . Returns None if the secret doesn ' t exist .
def _read_secret(self, project_id: str, secret_name: str):
        secret_manager = self._get_secret_manager_client()
        secret_path = secret_manager.secret_path(project_id, secret_name)
        response = secret_manager.access_secret_version(
            request={'name': f'{secret_path}/versions/latest'}
        )
        return response.payload.data.decode('UTF-8')
def _read_secret ( self , project_id : str , secret_name : str ) : secret_manager = self . _get_secret_manager_client ( ) secret_path = secret_manager . secret_path ( project_id , secret_name ) response = secret_manager . access_secret_version ( request = { 'name' : f'{secret_path}/versions/latest' } ) return response . payload . data . decode ( 'UTF-8' )
Reads the latest version of a GCP Secret Manager secret.
Reads the latest version of a GCP Secret Manager secret .
"""Reads the latest version of a GCP Secret Manager secret.
        Returns None if the secret doesn't exist."""
self
project_id
str
secret_name
str