MCPcopy Create free account
hub / github.com/s3tools/s3cmd / __init__

Method __init__

S3/S3.py:140–150  ·  view source on GitHub ↗
(self, s3, method_string, resource, headers, body, params = None)

Source from the content-addressed store, hash-verified

138 redir_map = {}
139
140 def __init__(self, s3, method_string, resource, headers, body, params = None):
141 self.s3 = s3
142 self.headers = SortedDict(headers or {}, ignore_case = True)
143 if len(self.s3.config.access_token)>0:
144 self.s3.config.role_refresh()
145 self.headers['x-amz-security-token']=self.s3.config.access_token
146 self.resource = resource
147 self.method_string = method_string
148 self.params = params or {}
149 self.body = body
150 self.requester_pays()
151
152 def requester_pays(self):
153 if self.s3.config.requester_pays and self.method_string in ("GET", "POST", "PUT", "HEAD"):

Callers

nothing calls this directly

Calls 3

requester_paysMethod · 0.95
SortedDictClass · 0.90
role_refreshMethod · 0.80

Tested by

no test coverage detected