Skip to main content

Passphrase Generator

Project description

Generate passphrases by randomly selecting and concatenating words from a list.

Note: This project is no longer maintained. Use xkcdpass instead.

Build Status Test Coverage PyPI Version

XKCD Comic


Use pip to install Keysmith.

pip install keysmith


Keysmith can be invoked from a command-line or imported in Python.


$ keysmith --help
usage: keysmith [-h] [--delimiter DELIMITER] [--encoding ENCODING]
                [--nsamples NTEETH] [--population POPULATION] [--stats]

optional arguments:
  -h, --help            show this help message and exit
  --delimiter DELIMITER
                        a delimiter for the samples (teeth) in the key
                        (default: )
  --encoding ENCODING   the encoding of the population file (default: utf-8)
  --nsamples NTEETH, -n NTEETH
                        the number of random samples to take (default: 6)
  --population POPULATION, -p POPULATION
                        alphanumeric, ascii_letters, digits, printable, or a
                        path to a file of line-delimited items (default:
  --stats               show statistics for the key (default: False)
  --version             show program's version number and exit
$ keysmith -n4
correct horse battery staple


>>> import keysmith
>>> help(keysmith)
>>> with open('/usr/share/dict/words', 'r') as words:
...     keysmith.key(seq=list(words), nteeth=4, delimiter=' ')
'correct horse battery staple'

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
keysmith-3.0.0-py3-none-any.whl (3.7 kB) Copy SHA256 hash SHA256 Wheel py3
keysmith-3.0.0.tar.gz (4.4 kB) Copy SHA256 hash SHA256 Source None

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