MCPcopy Index your code
hub / github.com/csev/py4e / _utf8_str

Function _utf8_str

code/oauth.py:52–57  ·  view source on GitHub ↗

Convert unicode to utf-8.

(s)

Source from the content-addressed store, hash-verified

50 return urllib.quote(s, safe='~')
51
52def _utf8_str(s):
53 """Convert unicode to utf-8."""
54 if isinstance(s, unicode):
55 return s.encode("utf-8")
56 else:
57 return str(s)
58
59def generate_timestamp():
60 """Get seconds since epoch (UTC)."""

Callers 1

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected