Skip to main content

Python library to generate random things.

Project description

Randomit 🎲

A Python library to generate random things.


Currently, randomit can generate a random word(s) based on a given theme, as well as load your words files to randomize them.

To see what's coming next, see open projects.

🕹️Usage

Words will always be different on each execution no matter what arguments being passed.

Randomize words

from randomit import Words

# return one word
Words().randomizer(return_one_word=True)
# cabinet
# bristlecone pine
# dim - bright

Words().randomizer()  # returns a list of 17k words
Words().randomizer(words_to_return=3)  # ['axis', 'overabundant', 'superuser']

Words().randomizer(letter_starts_with='A')  # returns all words that starts with letter "A" 
Words().randomizer(letter_starts_with='A', words_to_return=3)  # ['abandoned', 'able', 'absolute']
Words().randomizer(letter_starts_with='A', words_to_return=3, capitalize=True) # ['Apron', 'Ashes', 'Anvil']

Look for available built-in themes

Words().available_themes()
# ['random words', 'names', 'surnames', 'cities', 'countries', 'address']
# default is "random words" if "theme" argument is not specified

Specify theme you want to get words from

Words(theme='cities').randomizer() # pass available arguments + other theme from available_themes()

Load and pass your file(s) with words

Make sure all words are lowercase, and start on a new line (\n), otherwise it won't work.

# call your words
Words(file=YOUR_FILE).randomizer(return_one_word=True, capitalize=True)

# Bazinga!

📡 Installation

$ pip install randomit
$ git clone https://github.com/dimitryzub/randomit.git

👾 Suggestions

If you have any suggestions or ideas what will be good to add, get involved in discussions section.

🔬 Issues

For issues, visit issues page 🙃

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

randomit-0.1.5-py3-none-any.whl (132.6 kB view hashes)

Uploaded Python 3

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