Skip to main content

fraise

A Python module for generating correct horse battery staple like random passphrases.

Installation

pip install fraise

Usage

As an application

$ fraise --help
usage: fraise [-h] [--max-word-length MAX_WORD_LENGTH]
              [--minimum-length MINIMUM_LENGTH] [--separator SEPARATOR]
              [--word-count WORD_COUNT] [--capitalized]

Generate memorable passphrases

optional arguments:
  -h, --help            show this help message and exit
  --max-word-length MAX_WORD_LENGTH
                        The maximum length of each word (default 8)
  --minimum-length MINIMUM_LENGTH
                        Minimum length of the phrase (default 16)
  --separator SEPARATOR
                        What to put inbetween the words (default space)
  --word-count WORD_COUNT
                        How many words to include in the phrase (default 4)
  --capitalized         Capitalize the first letter of each word in the phrase

As a library

>>> import fraise

# By default, generate will return four lowercase words
>>> fraise.generate()
'luck unrewarded ghosts accumulation'

# Set the number of words
>>> fraise.generate(word_count=8)
'broadband hansom heaving inroad flyweight shopping abets realty'

# Require a passphrase of at least n character
>>> fraise.generate(minimum_length=32)
'virile pullets resuming worst unengaged phosphates'

# Change the separation character
>>> fraise.generate(separator='-')
'readers-reapply-bossiest-bylaw'

# Only use words of n characters or less
>>> fraise.generate(max_word_length=4)
'duct pond anon four'

# Capitalize each word
>>> fraise.generate(capitalize=True)
'Sinter Lean Filament Gossip'

Contributing

Please fork the repository and raise a pull request (PR). PRs require one approval in order to be merged into the master branch.

Issue tracking is maintained on a public Trello board. Please contact the repo owner if you would like access to the board. Commits should be prefixed with the Trello card ref, for example "FR-100 Did the thing". A link to the PR should be added to the card.

Initial setup

make init

Testing

make test

Building

make build

Tests will be run first and the directory cleaned.

Releasing

make release

Release files for fraise 1.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fraise 1.5.2
File Size Uploaded
fraise-1.5.2.tar.gz 177.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fraise 1.5.2
File Interpreter ABI Platform
fraise-1.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 358.1 kB

Release files / fraise-1.5.2.tar.gz

Download URL fraise-1.5.2.tar.gz
Size 177.5 kB
Tags Source
SHA-256 checksum
How to use checksums
205de47bc01e5c831608617eea7d6e64bd8cd88448023fc300656f576bd14fff
BLAKE2b-256 checksum
How to use checksums
83329d7fb7772c2a4e4d92c876658f201319a036d60854824eb8cf46bc4ae9db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

Release files / fraise-1.5.2-py3-none-any.whl

Download URL fraise-1.5.2-py3-none-any.whl
Size 180.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5fa2b5902cfb0932c427dc12ecfc71c493d796f7b52dae5e1866080408af0dc3
BLAKE2b-256 checksum
How to use checksums
d88de8082421587e27c9d0f252bbf927a25eaf476f5109778e7a2fc918cd8bdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

Release history Release notifications | RSS feed

This release

1.5.2 This release

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.5

3 release files

1.0.4

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page