MCPcopy
hub / github.com/redis/redis-py / get

Method get

redis/asyncio/connection.py:1146–1172  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1144 self.context: Optional[SSLContext] = None
1145
1146 def get(self) -> SSLContext:
1147 if not self.context:
1148 context = ssl.create_default_context()
1149 context.check_hostname = self.check_hostname
1150 context.verify_mode = self.cert_reqs
1151 if self.include_verify_flags:
1152 for flag in self.include_verify_flags:
1153 context.verify_flags |= flag
1154 if self.exclude_verify_flags:
1155 for flag in self.exclude_verify_flags:
1156 context.verify_flags &= ~flag
1157 if self.certfile or self.keyfile:
1158 context.load_cert_chain(
1159 certfile=self.certfile,
1160 keyfile=self.keyfile,
1161 password=self.password,
1162 )
1163 if self.ca_certs or self.ca_data or self.ca_path:
1164 context.load_verify_locations(
1165 cafile=self.ca_certs, capath=self.ca_path, cadata=self.ca_data
1166 )
1167 if self.min_version is not None:
1168 context.minimum_version = self.min_version
1169 if self.ciphers is not None:
1170 context.set_ciphers(self.ciphers)
1171 self.context = context
1172 return self.context
1173
1174
1175class UnixDomainSocketConnection(AbstractConnection):

Callers 15

__init__Method · 0.45
get_retryMethod · 0.45
handle_messageMethod · 0.45
send_commandMethod · 0.45
_connection_argumentsMethod · 0.45
parse_urlFunction · 0.45
__init__Method · 0.45
get_protocolMethod · 0.45
get_encoderMethod · 0.45
__init__Method · 0.45
get_node_from_keyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected