Python package to query the random user api
Project description
randuser
This file will become your README and also the index of your documentation.
Install
pip install randuser
How to use
from randuser.core import random_user
user1 = random_user(gender="female", nationality='BR')
user2 = random_user(gender="male", nationality="US")
print(user1)
{'gender': 'female', 'name': {'title': 'Ms', 'first': 'Ilaine', 'last': 'Aragão'}, 'location': {'street': {'number': 5151, 'name': 'Rua Treze '}, 'city': 'Campo Largo', 'state': 'Mato Grosso', 'country': 'Brazil', 'postcode': 95700, 'coordinates': {'latitude': '-5.0067', 'longitude': '-29.9712'}, 'timezone': {'offset': '+7:00', 'description': 'Bangkok, Hanoi, Jakarta'}}, 'email': 'ilaine.aragao@example.com', 'login': {'uuid': '0bc8d36f-71ce-4005-b609-8235c1ef9322', 'username': 'beautifullion602', 'password': 'happy2', 'salt': 'BgV5ccum', 'md5': '58b3fbaf0740347155fd93fbb314bfef', 'sha1': 'ca4e47d3eb8c98bd692e05dcc1eea947a3267444', 'sha256': '83dd680ab88317652f7946be2675206474cf711a3839541b1a6492ebc70c1a70'}, 'dob': {'date': '1953-07-17T15:41:16.929Z', 'age': 69}, 'registered': {'date': '2006-11-03T22:28:29.254Z', 'age': 16}, 'phone': '(70) 8952-1138', 'cell': '(70) 4938-4352', 'id': {'name': 'CPF', 'value': '744.546.024-87'}, 'picture': {'large': 'https://randomuser.me/api/portraits/women/31.jpg', 'medium': 'https://randomuser.me/api/portraits/med/women/31.jpg', 'thumbnail': 'https://randomuser.me/api/portraits/thumb/women/31.jpg'}, 'nat': 'BR'}
print(user2)
{'gender': 'male', 'name': {'title': 'Mr', 'first': 'Corey', 'last': 'Davidson'}, 'location': {'street': {'number': 9947, 'name': 'Camden Ave'}, 'city': 'Bozeman', 'state': 'South Dakota', 'country': 'United States', 'postcode': 98170, 'coordinates': {'latitude': '68.1637', 'longitude': '-107.5021'}, 'timezone': {'offset': '+4:30', 'description': 'Kabul'}}, 'email': 'corey.davidson@example.com', 'login': {'uuid': '3af11cf9-d8bc-4fe2-9e93-cb2d57d8d891', 'username': 'tinylion310', 'password': 'filthy', 'salt': 'K2HSV94j', 'md5': '5a4729e23552e599187208b5f44e4fc4', 'sha1': '928f05d4af4a27e10b8036c1cd9920f86dcc8f42', 'sha256': 'ab92f8b0cae11c78685fb13b4a8a1fc0efa7794b8d9876ac2d041a78184694d4'}, 'dob': {'date': '1988-10-30T00:04:57.381Z', 'age': 34}, 'registered': {'date': '2016-05-27T18:11:35.274Z', 'age': 6}, 'phone': '(834) 858-5500', 'cell': '(560) 471-6729', 'id': {'name': 'SSN', 'value': '409-21-2391'}, 'picture': {'large': 'https://randomuser.me/api/portraits/men/15.jpg', 'medium': 'https://randomuser.me/api/portraits/med/men/15.jpg', 'thumbnail': 'https://randomuser.me/api/portraits/thumb/men/15.jpg'}, 'nat': 'US'}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
randuser-0.0.1.tar.gz
(8.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file randuser-0.0.1.tar.gz.
File metadata
- Download URL: randuser-0.0.1.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2be0046275149735237225ad92a1c7d2d85ba0349ce55af6852f12182c99d0c9
|
|
| MD5 |
0290199a92aa68d6c9b4fdcd20c676cc
|
|
| BLAKE2b-256 |
2d7f8805a9271e61e76fa7061d4b19e35658798927fe612421e37dddde83d7c2
|
File details
Details for the file randuser-0.0.1-py3-none-any.whl.
File metadata
- Download URL: randuser-0.0.1-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
342495bc99bf727e77a4f4666ec0189b2f1b3fc215b4d1cf1056aec6b02d7a66
|
|
| MD5 |
0e6fc18a5411f9c4e104bb0f56cc32da
|
|
| BLAKE2b-256 |
c9c152d9fd2e1b741ab844fa1d8dbb9dcb5471f78db83d53f6a960475d74c716
|