Skip to content

Instantly share code, notes, and snippets.

@glens
Last active May 11, 2022 06:49
Show Gist options
  • Save glens/1b0b9c8b2cd09ac670b5549679c974f4 to your computer and use it in GitHub Desktop.
Save glens/1b0b9c8b2cd09ac670b5549679c974f4 to your computer and use it in GitHub Desktop.
Generator for common environment names
#!/usr/env python3
# environment name generator
# glen@glenscott.net
# @memoryresident
# github.com/glens
environment_types = [
"local",
"remote",
"sand",
"sandbox",
"dev",
"test",
"user",
"qa",
"staging",
"stage",
"prod",
"deploy",
"oat",
"uat",
"acceptance",
"pre-prod",
"integration",
"app",
"db",
"web",
"cache",
"store"
]
company_names = [
'acme',
'contoso',
'skynet'
]
rounds_to_generate = 5
for company in company_names:
for environment in environment_types:
print("{}-{}".format(company,environment))
for N in range(0,rounds_to_generate):
for delimiter in ["-","_",""]:
print("{}{}{}{}{}".format(company,delimiter,environment,delimiter,N))
print("{}{}{}{}".format(company,delimiter,environment,N))
print("{}{}{}".format(company,environment,N))
print("{}{}{}{}{}".format(environment,delimiter,N,delimiter,company))
print("{}{}{}{}".format(environment,N,delimiter,company))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment