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

Description Type Link
Random Data Website General Click
Randommer Data Website General Click
Random Geek Jokes Jokes Click
Evil Insult Generator Jokes Click
Dad Jokes Jokes Click
Shibe Generator Images Click
Testimonial Generator Text Click
Text Generator Text Click
Faker Images/General Click

To use the Randommer API you will require a API Key. To create one is free. Follow link to 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 Methods

Module Example Output
Address client.address.get_random(size=5) df of addresses
Appliances client.appliance.get_random(size=5) df of appliances
Apps client.app.get_random(size=5) df of apps
Banks client.bank.get_random(size=5) df of banks :bank:
Beers client.beer.get_random(size=5) df of beers :beers:
Blood client.blood.get_random(size=5) df of blood types
Credit Cards client.business_credit_card.get_random(size=5) df of credit card numbers :credit_card:
Cannabis client.cannabis.get_random(size=5) df of cannabis data
Code client.code.get_random(size=5) df of code
Coffee client.coffee.get_random(size=5) df of coffee :coffee:
Commerce client.commerce.get_random(size=5) df of products
Company client.company.get_random(size=5) df of company data
Computer client.computer.get_random(size=5) df of operating systems
Crypto client.crypto.get_random(size=5) df of Crypto hashes
Crypto Coin client.crypto_coin.get_random(size=5) df of crypto coins
Color client.color.get_random(size=5) df of colors
Dessert client.dessert.get_random(size=5) df of desserts
Devices client.device.get_random(size=5) df of phones :iphone:
Food client.food.get_random(size=5) df of foods
Names client.name.get_random(size=5) df of full names :name_badge:
Hipster client.hipster.get_random(size=5) df of hipster text
Invoice client.invoice.get_random(size=5) df of invoice data
User client.user.get_random(size=5) df of user data
Stripe client.stripe.get_random(size=5) df of stripe financial data
Subscription client.subscription.get_random(size=5) df of subscriptions
Vehicle client.vehicle.get_random(size=5) df of vehicles :car:
Id_Number client.id_number.get_random(size=5) df of id numbers - Including SSN
Internet Stuff client.internet_stuff.get_random(size=5) df of logins and browser info
Lorem Ipsum client.lorem_ipsum.get_random(size=5) df of fake text for website
Lorem Pixel client.lorem_pixel.get_random(size=5) df of fake image data
Lorem Flickr client.lorem_flickr.get_random(size=5) df of fake image from flickr
Nation client.nation.get_random(size=5) df of nations
Number client.number.get_random(size=5) df of numbers
Phone Number client.phone_number.get_random(size=5) df of Phone Numbers :telephone:
Place Hold It client.placeholdit.get_random(size=5) df of placeholder images
Restaurant client.restaurant.get_random(size=5) df of restaurants
Fancy Random client.fancy_random.generate_business_name(size=5) df of fake business Names
Fancy Random client.fancy_random.generate_brand_name(starting_word='funny') df of brand names
Fancy Random client.fancy_random.generate_product_reviews(size=2, product='toy') df of product reviews
Geek Jokes client.geek.get_joke() df of geek jokes
Evil Insults client.evil.generate_insult() df of insults
Dad Jokes client.dad.get_dad_joke() df of dad jokes
Dad Jokes client.dad.search_dad_jokes(page=1, limit=2, term='cat') df of found dad jokes
Shibe client.shibe.generate_images(size=1) df of shibe images
Testimonials client.testimonial.generate_random() df of Testimonials
Meta client.meta.get_paragraphs(size=2) df of paragraphs
Meta client.meta.get_sentences(size=2) df of sentences
Meta client.meta.get_doc(paragraph_size=5, sentence_size=2) df of paragraphs and sentences
Faker client.faker.get_addresses(self, size=1, country='en_US') df of addresses
Faker client.faker.get_books(self, size=1, country='en_US') df of books
Faker get_companies(self, size=1, country='en_US') df of companies
Faker get_credit_cards(self, size=1, country='en_US') df of cc
Faker get_places(self, size=1, country='en_US') df of longitude and latitude of places
Faker get_users(self, size=1, country='en_US') df of users
Faker get_texts(self, size=1, characters=350, country='en_US') df of text
Faker get_products(self, size=1, price_min=0.01, price_max=10.35, taxes=25, categories_type='', country='en_US') df of products by category
Faker get_persons(self, size=1, gender='male', birthday_start='1991-01-01', birthday_end='2022-01-01', country='en_US') df of people
Faker get_images(self, size=1, type='any', width='640', height='480', country='en_US') df of images

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

Disclaimer

  1. This library depends on the source API's still working as intended. If they change or pull their resources the code will no longer work as none of the logic is done in this library but pulled from around the web.

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.8.0.tar.gz (11.3 kB view details)

Uploaded Source

File details

Details for the file random-text-1.8.0.tar.gz.

File metadata

  • Download URL: random-text-1.8.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.0

File hashes

Hashes for random-text-1.8.0.tar.gz
Algorithm Hash digest
SHA256 5d037d805cb7a714379dd69d26d21c24836cfd93b6a4fe456dabe1a3a4474721
MD5 76f57ff2ea1b446d4e8c21b3705e586e
BLAKE2b-256 b158296a83d218d66ba324171a5b423f77aea559e2c4c3edb6f53635e7c039df

See more details on using hashes here.

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