Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Simple python package that generates strings with randomly selected words.

Project description

TTRW

It's a simple python package that returns a string with a few random words similar to name generator for twitch.tv clips. Words are chosen from built in dictionary and capitalized. The first one is an adverb, the second is an adjective and the third is a noun.

You can also choose to get single word (adjective/adverb/noun).

There are english and polish dictionaries available (Polish words without national/accented characters).

>>> ttrw.get_random_words()  
VerySadFish
$ python -m ttrw
SlightlyHandsomePotato

Installation:

Use pip:

pip install ttrw

Usage:

Sample usage:

import ttrw

print("Available languages:")
print(ttrw.languages)

print(ttrw.get_random_words())
print(ttrw.get_random_words("en"))
print(ttrw.get_random_words(lang="pl"))

print(ttrw.random_noun())
print(ttrw.random_adjective(lang="pl"))

You can also just execute the module in terminal:

python -m ttrw
python -m ttrw en
python -m ttrw pl

References:

English dictionary is based on WordNet®.
Polish Dictionary is based on ArkadiaWiki and https://sjp.pl/.

Licenses for each dictionary are in their respective folders.

License:

Code is under MIT license. See "LICENSE" file.

Project details


Download files

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

Files for ttrw, version 1.3
Filename, size File type Python version Upload date Hashes
Filename, size ttrw-1.3-py3-none-any.whl (364.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size ttrw-1.3.tar.gz (363.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page