Skip to main content

A variation of the Augustus Cipher that offsets space-separated words based on the position of each character.

Project description


Current Version Python Versions License Code style: black PR's Welcome

A variation of the Augustus Cipher that offsets space-separated words based on the position of each character; contrary to what Augustus had originally practiced, letters wrap around instead of presenting a special case.

"Whenever he wrote in cipher, he wrote B for A, C for B, and the rest of the letters on the same principle, using AA for X."

Suetonius, Life of Augustus 88


Through pip:

λ> python -m pip install stepped-augustus


As a CLI application:

λ> augustus -h
usage: augustus [-h] [--direction {left,right}] [--multiplier MULTIPLIER] message

Ciphers a given message.

positional arguments:
  message               The message to be ciphered

optional arguments:
  -h, --help            show this help message and exit
  --direction {left,right}
                        The direction to cipher the message to
  --multiplier MULTIPLIER
                        The multiplier to be applied when ciphering a message

λ> augustus "Hello, World" --direction right --multiplier 1
Igopt, Xqupi

λ> augustus "Igopt, Xqupi" --direction left --multiplier 1
Hello, World

As a package:

>>> from augustus import SteppedAugustus as SA
>>> SA("Hello, World", 1).right_cipher
'Igopt, Xqupi'
>>> SA("Igopt, Xqupi", 1).left_cipher
'Hello, World'
>>> # Alternatively the _cipher method can be used for lazy
>>> # evaluation and customizing the direction.
>>> for char in SA("Hello", 1)._cipher(1):
...     print(char)
>>> # Additionally, skip_chars and stop_chars can specified
>>> # to semantically modify the behaviour of the algorithm.
>>> # Shifts with 10234
>>> SA("Hello", skip_chars="H").right_cipher
>>> # Shifts with 11234
>>> SA("Hello", stop_chars="e").right_cipher
>>> # Shifts with 10123
>>> SA("Hello", skip_chars="e", stop_chars="e").right_cipher

Project details

Download files

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

Files for stepped-augustus, version 1.2.0
Filename, size File type Python version Upload date Hashes
Filename, size stepped_augustus-1.2.0-py3-none-any.whl (6.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size stepped-augustus-1.2.0.tar.gz (5.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page