/glarg

A pseudo-word passphrase generator

Primary LanguagePythonOtherNOASSERTION

glarg: a pseudo-word passphrase generator

Objectives

  1. Convenience:
    1. Easy to remember: subjectively easier for English speakers than alternatives
    2. Easy to input: letters and non-letters are grouped to minimize keyboard switching on mobile devices
  2. Security: A reasonably high amount of entropy so that guessing is difficult even when the generation formula is known
  3. Compatibility: the formula meets the majority of sites' complexity requirements

Usage

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

History

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.

Testing Quick Start

  1. Change directory into repository (into same directory as where this README resides).

  2. Install virtual environment (assuming Python 2 is default):

    mkvirtualenv -a . -r tests/requirements.txt glarg_test2
    
    1. If installing requirements errors, update pip:

      pip install --upgrade pip
      
    2. Install requirements:

      pip install -r tests/requirements.txt
      
  3. 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

Python Compatibility

badge: Travis CI master branch status

This module is compatible with:

  • Python 2.7
  • Python 3.5
  • Python 3.6
  • Python 3.7
  • Python 3.8

License