Skip to content

Instantly share code, notes, and snippets.

Last active July 26, 2016 06:20
What would you like to do?
Sample user creation tool for WSO2 ES bulk user uploading
HEADER_STRING = "Username,Password,Claims,"
data_line = "{0},{0},http://{1}//claims/emailaddress={0}@{1},{2}\n"
file_string = HEADER_STRING + "\n"
domain = ""
role = ""
name_template = "user{}"
users_count = 51
with open(r'usernames.csv','w') as sample_file:
for index in range(1, users_count):
current_name = name_template.format(index)
file_string += data_line.format(current_name, domain, role)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment