Python Random User Generator
Python class for generating random user data using randomuser.me API.
Basic Usage
from randomuser import RandomUser
# Generate a single user
user = RandomUser()
# Generate a list of 10 random users
user_list = RandomUser.generate_users(10)
Both RandomUser() and RandomUser.generate_users() can optionally accept a dictionary of parameter names to desired values using the get_params optional parameter:
# Generate a random female user
user = RandomUser({'gender': 'female'})
# Generate a list of 10 random users from Canada
user_list = RandomUser.generate_users(10, {'nat': 'ca'})
For more information on what parameters can be specified, see the randomuser.me documentation.
Method Overview
For details on the RandomUser class and optional parameters for these methods, see the documentation.
Getter Methods
get_cell()
get_city()
get_dob()
get_email()
get_first_name()
get_full_name()
get_gender()
get_id()
get_id_number()
get_id_type()
get_info()
get_last_name()
get_login_md5()
get_login_salt()
get_login_sha1()
get_login_sha256()
get_nat()
get_password()
get_phone()
get_picture()
get_postcode()
get_registered()
get_state()
get_street()
get_username()
get_zipcode()
Metadata
Release files for randomuser 1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| randomuser-1.6.tar.gz | 5.0 kB | Without provenance | Details for randomuser-1.6.tar.gz |
Release files / randomuser-1.6.tar.gz
| Download URL | randomuser-1.6.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe50090b0397ce138efdad97b132fb934a6a7afea314537786778210bdf2531e
|
|
BLAKE2b-256 checksum How to use checksums |
b3986e2d0a77d8c420c0d9eba678868ff4978edfa0c78ae5a183efbf29819c5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6
|
Security for randomuser 1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.