MCPcopy Index your code
hub / github.com/pywebio/PyWebIO / random_str

Function random_str

pywebio/utils.py:283–289  ·  view source on GitHub ↗

生成字母和数组组成的随机字符串 :param int length: 字符串长度

(length=16)

Source from the content-addressed store, hash-verified

281
282
283def random_str(length=16):
284 """生成字母和数组组成的随机字符串
285
286 :param int length: 字符串长度
287 """
288 candidates = string.ascii_letters + string.digits
289 return ''.join(random.SystemRandom().choice(candidates) for _ in range(length))
290
291
292def run_as_function(gen):

Callers 10

__enter__Method · 0.85
put_loadingFunction · 0.85
put_datatableFunction · 0.85
outputFunction · 0.85
popupFunction · 0.85
use_scopeFunction · 0.85
gen_coro_idMethod · 0.85
register_callbackMethod · 0.85
_init_sessionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…