MCPcopy Create free account
hub / github.com/adobe/Marinus / __init__

Method __init__

python3_cron_scripts/libs3/AWSStorageManager.py:71–89  ·  view source on GitHub ↗

Initialize the instance

(self, config_file="", log_level=None)

Source from the content-addressed store, hash-verified

69 self._s3_resource = self._aws_session.resource("s3")
70
71 def __init__(self, config_file="", log_level=None) -> None:
72 """
73 Initialize the instance
74 """
75
76 self._logger = self._log()
77 if log_level is not None:
78 self._logger.setLevel(log_level)
79
80 if config_file != "":
81 self._storage_config_file = config_file
82
83 config = configparser.ConfigParser()
84 list = config.read(self._storage_config_file)
85 if len(list) == 0:
86 self._logger.error("Error: Could not find the config file")
87 exit(1)
88
89 self._auth_to_amazon(config)
90
91 def write_file(self, folder: str, filename: str, data: bytes) -> bool:
92 """

Callers

nothing calls this directly

Calls 2

_logMethod · 0.95
_auth_to_amazonMethod · 0.95

Tested by

no test coverage detected