Skip to main content

A Python client library Random Data Api

Project description

License

Random-Text

A Random Object Generator for Addresses, Names, Reviews, Testimonials, Business Names, and Random Objects.

Sources

  1. For an Overview of the Random Data API, click here.
  2. For an Overview of the Randommer.io API click here
  3. For an Overview of Random Geek Jokes, see above link.
  4. For an Overview of Evil Insult Generator see above link.
  5. For an Overview of Dad Jokes API click here
  6. For an Overview of Shibe.online API see above link.
  7. 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:

  1. Address
  2. Appliances
  3. Apps
  4. Banks
  5. Beers
  6. Blood
  7. Credit Card
  8. Cannabis
  9. Code
  10. Coffee
  11. Commerce
  12. Company
  13. Computer
  14. Crypto
  15. Crypto Coin
  16. Color
  17. Dessert
  18. Device
  19. Food
  20. Dessert
  21. Device
  22. Name
  23. Hipster
  24. Invoice
  25. User
  26. Stripe
  27. Subscription
  28. Vehicle
  29. Id_Number
  30. Internet Stuff
  31. Lorem Ipsum
  32. Lorem Pixel
  33. Lorem Flickr
  34. Nation
  35. Number
  36. Phone Number
  37. Place Hold It
  38. Restaurant
  39. Fancy Random
  40. Geek Jokes
  41. Evil Insults
  42. Dad Jokes
  43. Shibe
  44. Testimonials

TO DO

  1. 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)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page