https://github.com/connordelacruz/python-randomuser
👩💻 🎲 👨💻 Python class for generating random user data using https://randomuser.me API
https://github.com/connordelacruz/python-randomuser
python randomuser
Last synced: 8 months ago
JSON representation
👩💻 🎲 👨💻 Python class for generating random user data using https://randomuser.me API
- Host: GitHub
- URL: https://github.com/connordelacruz/python-randomuser
- Owner: connordelacruz
- License: mit
- Created: 2018-02-25T21:45:07.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-15T22:51:21.000Z (about 6 years ago)
- Last Synced: 2025-09-12T04:47:09.730Z (9 months ago)
- Topics: python, randomuser
- Language: Python
- Homepage:
- Size: 7.05 MB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Python Random User Generator
============================
|pypi|
|license|
|github|
.. |pypi| image:: https://img.shields.io/pypi/v/randomuser.svg
:alt: PyPI
:target: https://pypi.python.org/pypi/randomuser
.. |license| image:: https://img.shields.io/pypi/l/randomuser.svg
:alt: PyPI - License
.. |github| image:: https://img.shields.io/badge/GitHub--green.svg?style=social&logo=github
:alt: GitHub
:target: https://github.com/connordelacruz/python-randomuser
Python class for generating random user data using
`randomuser.me `__ API.
Basic Usage
-----------
.. code:: python
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:
.. code:: python
# 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 `__.
.. readme-only
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()``