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 hashes)