first commit

This commit is contained in:
Blake Ridgway 2025-02-12 20:58:25 -06:00
commit c55faa80f2

14
string_generator.py Normal file
View file

@ -0,0 +1,14 @@
import secrets
import string
def generate_random_subdomain(length=8):
# Choose from alphanumeric characters
alphabet = string.ascii_lowercase + string.digits
# Generate a random subdomain using the chosen alphabet
subdomain = ''.join(secrets.choice(alphabet) for _ in range(length))
return f"psql-{subdomain}.rideaware.org"
# Example usage:
random_url = generate_random_subdomain()
print(random_url) # e.g., "a1b2c3d4.rideaware.org"