Skip to main content

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.

Source Distribution

ttrw-1.3.tar.gz (363.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ttrw-1.3-py3-none-any.whl (364.4 kB view details)

Uploaded Python 3

File details

Details for the file ttrw-1.3.tar.gz.

File metadata

  • Download URL: ttrw-1.3.tar.gz
  • Upload date:
  • Size: 363.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for ttrw-1.3.tar.gz
Algorithm Hash digest
SHA256 c67de1695e052a269e098a3cc919c51a2caa2db28716944a73c5691b3706faff
MD5 121b424328034f73be80dff847ba5b11
BLAKE2b-256 8c3ab71c62b35efa26b47d232001806e196178df632e06bb9103d3d1a884dcb2

See more details on using hashes here.

File details

Details for the file ttrw-1.3-py3-none-any.whl.

File metadata

  • Download URL: ttrw-1.3-py3-none-any.whl
  • Upload date:
  • Size: 364.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for ttrw-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a9f6569f02ac6490960525c4d6937651fa9560413a92ab82c074e1d49d91e16a
MD5 2951bfac19cd610f3c919ee04798b573
BLAKE2b-256 ad76f2b7013e01e6fecbc26a965b3f77954d8f2b7e500d8ed1760f5a5a89c3b7

See more details on using hashes here.

Supported by

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