A Python client library Random Data Api
Project description
Random-Text
A Random Object Generator for Addresses, Names, Reviews, Testimonials, Business Names, and Random Objects.
Sources
- Random Data Website
- Randommer Data Website
- Random Geek Jokes
- Evil Insult Generator
- Dad Jokes
- Shibe Generator
- Testimonial Generator
- For an Overview of the Random Data API, click here.
- For an Overview of the Randommer.io API click here
- For an Overview of Random Geek Jokes, see above link.
- For an Overview of Evil Insult Generator see above link.
- For an Overview of Dad Jokes API click here
- For an Overview of Shibe.online API see above link.
- For an Overview of Testimonial Generator see above linke.
To use the second api you will require a API Key. To create one is free. Go to Randommer.io website and register as a user and you will find API Key in your "account" section. Don't forget to pass in the API key to the RandomTextClient if you want to use the second generator.
Requirements
- Python >= 3.6
Getting started
pip install random-text
random-text
is simple to use -- take a look at the below example:
from randomText import RandomTextClient
client = RandomTextClient(api_key='api_key')
Available methods:
Basic Usage (No Api Key Required)
df = client.address.get_random(size=1)
print(df.head(2))
Advanced Usage - Requires API Key when creating the client.
business_name = client.fancy_random.generate_business_name(size=2)
brand_name = client.fancy_random.generate_brand_name(starting_word='funny')
product_reviews = client.fancy_random.generate_product_reviews(size=2, product='toy')
Available Objects:
- Address
- Appliances
- Apps
- Banks
- Beers
- Blood
- Credit Card
- Cannabis
- Code
- Coffee
- Commerce
- Company
- Computer
- Crypto
- Crypto Coin
- Color
- Dessert
- Device
- Food
- Dessert
- Device
- Name
- Hipster
- Invoice
- User
- Stripe
- Subscription
- Vehicle
- Id_Number
- Internet Stuff
- Lorem Ipsum
- Lorem Pixel
- Lorem Flickr
- Nation
- Number
- Phone Number
- Place Hold It
- Restaurant
- Fancy Random
- Geek Jokes
- Evil Insults
- Dad Jokes
- Shibe
- Testimonials
TO DO
- Add as many random open api's from the web. Based off https://github.com/public-apis/public-apis
Tests
To run tests:
python -m unittest discover -p *test.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
random-text-1.6.0.tar.gz
(8.0 kB
view hashes)