Skip to main content

Arrr.py - Pirate Speak for Python

A simple script / module to turn plain English into Pirate speak. Arrr.

Someone mentioned something called “Pirate Python”, I idly wondered if anyone had made an English to Pirate-ish module/command written in Python (they hadn’t), I realised I had a burning desire to make one, and things got out of hand. :-)

We have an entirely serious code of conduct and a not-so-serious code of mis-conduct for those of a more Piratical disposition.

Installation

To install simply type:

$ pip install arrr

…and the package will download from PyPI. If you wish to upgrade to the latest version, use the following command:

$ pip install --no-cache --upgrade arrr

Command Usage

Once installed, you’ll find you have a pirate command to use in your shell.

To read the (non-Pirate friendly) help, simply type:

$ pirate --help

or:

$ pirate -h

To translate plain English into something Pirate-ish simply call the command followed by some English sentence:

$ pirate hello there. how are you today?
Ahoy there. Weigh anchor and hoist the mizzen! How are ye today?

The pirate command will reply with a Pirate-ish equivalent (as shown above).

Using the API

The arrr module’s API is fully documented below. All you really need is to import the translate function and use that to return Pirate-ish sentences from a given input in English:

from arrr import translate


english = "Hello there. How are you?"
pirate = translate(english)
print(pirate)

The script above will print output similar to that for the command-line usage example shown above.

Development

The source code is hosted in GitHub. Please feel free to fork the repository and contribute. Assuming you have Git installed you can download the code from the canonical repository with the following command:

$ git clone https://github.com/ntoll/arrr.git

Ensure you have the correct dependencies for development installed by creating a virtualenv and running:

$ pip install -r requirements.txt

Pull requests are most welcome! Honestly, the arrr module was cobbled together in about 5 minutes and I went overboard (geddit?) with creating a simple yet well packaged and documented project so arrr can act as a good example for beginner developers.

If you find any bugs, submit a new issue. Thank you!

Release History

1.0.5

  • New ship in which to sail: MicroPython.

1.0.4

  • Cleaned up blots in the cap’n’s log.

  • More piratical ways to mangle English.

1.0.3

  • Project boarded by new pirate matey Calico Hutchison (two new salty phrases).

1.0.2

  • Plundered more piratical phrases from t’interwebz.

  • A more piratical handling of exceptions.

1.0.1

  • More salty seadog parlay vocabulary.

1.0.0

  • Minor additions to the vocabulary.

  • Black (spot) formatted.

1.0.0.beta.3

  • Better arrrg parsing contributed by Tony “buccaneer baloney” Shaw.

  • Corrections of speeling mistaiks by Esteve “make mine an Aranjuez” Fernandez.

1.0.0.beta.2

  • Major code optimizations by old salty sea dog Terry Jones.

  • A more terrifying logo by Cap’n Steve “Inkspot” Hawkes.

  • Addition of a code of mis-conduct (for Pirates) by terror of the seas, Tim “No beard” Golden.

1.0.0.beta.1

  • Minor documentation fixes.

  • Minor corrections in the code.

1.0.0.alpha.1

  • Initial release.

  • Very simple implementation.

  • Documentation.

  • No tests.

Release files for arrr 1.0.6

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

Source distribution (sdist)

Source distribution for arrr 1.0.6
File Size Uploaded
arrr-1.0.6.tar.gz 6.7 kB Details

Built distribution (wheel)

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

Total release size: 13.9 kB

Release files / arrr-1.0.6.tar.gz

Download URL arrr-1.0.6.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e3b02bef633c3b22a4cbb939b14f6fd47403ea115b60e1e842c4086b5a2f3567
BLAKE2b-256 checksum
How to use checksums
08fe3bfc84978fdfa50e3361244736423553184a638a0e5c12a6bcb639ba56df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / arrr-1.0.6-py3-none-any.whl

Download URL arrr-1.0.6-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9cc753a0721ed962efdf3f0524d5cabe4a6253532ecca03873d16b9ff69f60f
BLAKE2b-256 checksum
How to use checksums
c3952ea86c281edaded04ba71ddb2284091a9e241bd1049f03af3a9ffb076d46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7
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