New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

randomuser

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

randomuser

Python class for generating random user data using https://randomuser.me API

pipPyPI
Version
1.6
Maintainers
1

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 <https://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 <https://randomuser.me/documentation>__.

.. readme-only

Method Overview

For details on the RandomUser class and optional parameters for these methods, see the documentation <http://connordelacruz.com/python-randomuser/randomuser.html>__.

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()``

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts