Python module to generate a random pair of English words
To get a username-based code (e.g. for SD212 homework):
from rand_wordpair import show_user_code
show_user_code() # prints code wordpair to the screen
To get a random pair of words:
from rand_wordpair import gen_pair
print(gen_pair()) # different every time, e.g. sudsy-pickup
Uses nltk and the WordNet database.
Follow this tutorial on packaging and this quickstart for setuptools.
Pip/conda/mamba packages needed:
build twine
To test:
python3 test.py
To build:
python3 -m build
To publish on pypi (requires account setup and api token):
python3 -m twine upload --repository testpypi dist/*