- Convenience:
- Easy to remember: subjectively easier for English speakers than alternatives
- Easy to input: letters and non-letters are grouped to minimize keyboard switching on mobile devices
- Security: A reasonably high amount of entropy so that guessing is difficult even when the generation formula is known
- Compatibility: the formula meets the majority of sites' complexity requirements
glarg creates pseudo-words which consist of one consonant-vowel-consonant
syllable that sounds like it could be English. Sometimes it spits out real
words. Most of the time, it does not:
>>> import glarg >>> glarg.generate_word() 'zept' >>> glarg.generate_word() 'prast' >>> glarg.generate_words(3) ['yink', 'glunt', 'skim', 'jask']
It also works as a console script:
~$ glarg 6 Noonk.7038.swab.noold.swousp.kusk.suk ~$ glarg Dek.1832.led.swuip
The glarg module let's you generate random, pronounceable pseudo-words. It
started life as StackOverflow answer about password generators. It was then
forked from greghaskins/gibberish, after being abandoned for over 4 years.
Change directory into repository (into same directory as where this README resides).
Install virtual environment (assuming Python 2 is default):
mkvirtualenv -a . -r tests/requirements.txt glarg_test2
If installing requirements errors, update pip:
pip install --upgrade pip
Install requirements:
pip install -r tests/requirements.txt
Run pytest:
py.test
To test against alternate Python versions, it may be useful to create virtual
environments with an interpreter other than the one with which virtualenv
was installed, e.g. for non-default python3:
mkvirtualenv -a . -p '/usr/bin/env python3' -r tests/requirements.txt \ glarg_test3
This module is compatible with:
- Python 2.7
- Python 3.5
- Python 3.6
- Python 3.7
- Python 3.8
- LICENSE.txt (Expat License/MIT License)