MCPcopy Create free account
hub / github.com/TechifyBots/File-Stream-Bot / generate_random_alphanumeric

Function generate_random_alphanumeric

biisal/bot/plugins/stream.py:22–26  ·  view source on GitHub ↗

Generate a random 8-letter alphanumeric string.

()

Source from the content-addressed store, hash-verified

20db = Database(Var.DATABASE_URL, Var.name)
21
22def generate_random_alphanumeric():
23 """Generate a random 8-letter alphanumeric string."""
24 characters = string.ascii_letters + string.digits
25 random_chars = ''.join(random.choice(characters) for _ in range(8))
26 return random_chars
27
28def get_shortlink(url):
29 rget = requests.get(f"https://{Var.SHORTLINK_URL}/api?api={Var.SHORTLINK_API}&url={url}&alias={generate_random_alphanumeric()}")

Callers 1

get_shortlinkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected