MCPcopy Create free account
hub / github.com/oauthlib/oauthlib / encode_params_utf8

Function encode_params_utf8

oauthlib/common.py:72–81  ·  view source on GitHub ↗

Ensures that all parameters in a list of 2-element tuples are encoded to bytestrings using UTF-8

(params)

Source from the content-addressed store, hash-verified

70
71
72def encode_params_utf8(params):
73 """Ensures that all parameters in a list of 2-element tuples are encoded to
74 bytestrings using UTF-8
75 """
76 encoded = []
77 for k, v in params:
78 encoded.append((
79 k.encode('utf-8') if isinstance(k, str) else k,
80 v.encode('utf-8') if isinstance(v, str) else v))
81 return encoded
82
83
84def decode_params_utf8(params):

Callers 1

urlencodeFunction · 0.85

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…