Functions
Urlsafe

urlsafe() function

The urlsafe() function generates a random, URL-safe string that can be used in URLs without the need for encoding. The generated string includes upper and lowercase alphabetic characters, digits, and unreserved URL special characters (-, _, ., ~).

Syntax

Basic

Will return a 6 character long URL-safe string

strig.urlsafe()  # Example output: 'A3b-Z_'
ParameterTypeDefaultDescription
lengthint6The length of the generated random string.
prefixstr""A string to add at the beginning of the generated string. This will add to the length of the generated string.