MCPcopy Create free account
hub / github.com/aws/aws-cli / _get_base64

Method _get_base64

awscli/botocore/serialize.py:167–173  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

165 return shape.serialization.get('name', default_name)
166
167 def _get_base64(self, value):
168 # Returns the base64-encoded version of value, handling
169 # both strings and bytes. The returned value is a string
170 # via the default encoding.
171 if isinstance(value, str):
172 value = value.encode(self.DEFAULT_ENCODING)
173 return base64.b64encode(value).strip().decode(self.DEFAULT_ENCODING)
174
175 def _expand_host_prefix(self, parameters, operation_model):
176 operation_endpoint = operation_model.endpoint

Callers 4

_serialize_type_blobMethod · 0.80
_serialize_type_blobMethod · 0.80
_convert_header_valueMethod · 0.80
_serialize_type_blobMethod · 0.80

Calls 2

decodeMethod · 0.80
encodeMethod · 0.45

Tested by

no test coverage detected