You can download this code by clicking the button below.
This code is now available for download.
This function uses the Graylog third-party library to create a random user and returns the user object.
Technology Stack : graylog2_client
Code Type : Function
Code Difficulty : Intermediate
def generate_random_user(arg1, arg2, arg3):
from graylog2_client import Client
from graylog2_client.models import User
client = Client('http://your-graylog-url', 'your-user', 'your-password')
user = User(username=arg1, email=arg2, full_name=arg3)
user = client.users.create(user)
return user