Skip to main content

A simple tool helps you generate fake users.

Project description

RandomUsers

License: MIT Supported Python versions PyPi Package Version
A simple tool helps you generate fake users.

Installation

$ pip install RandomUsers

Example

More examples in /examples.

basic

import RandomUsers as ru
# Create username object
username = ru.Username()
# Create password object
password = ru.Password()
# Create email object
email = ru.Email()
# Create user model object
user_model = ru.User(username=username, password=password, email=email)
user = user_model.generate()
print(user.username, user.password, user.email)

advanced

import RandomUsers as ru
name = ru.Name()
username = ru.Username()
# "@", "#" and "$" must be in the password
password = ru.Password(length_range=range(20,25), must="@#$")
birth = ru.Birth(birth_year_range=range(2000, 2011))
user_model = ru.User(name=name, username=username, password=password, birth=birth)
user = user_model.generate()
print(user.surname, user.forename, user.username, user.password, user.birthday, user.age)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

RandomUsers-0.4.tar.gz (4.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page