INNER CODE UNIT · Python

BotoClient

grycap/scar · scar/providers/aws/clients/__init__.py:22

class BotoClient():
    """Generic class in charge of creating a boto client based on the
    'boto_client_name' property of the class that inherits it."""

    _READ_TIMEOUT = 360
    _BOTO_CLIENT_NAME = ''

    def __init__(self, client_args: Dict):
        self.client_args = client_args.get('client', {})
        self.session_args = client_args.get('session', {})

    @lazy_property
    def client(self):
        """Returns a boto client based on the 'boto_client_name' property,
        the region specified on the client args and
        the profile specified on the session args."""
        # 'default' profile if nothing set
        session = boto3.Session(**self.session_args)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…