Skip to main content

Tool to generate One-Time Passwords

Project description

Tool to generate One-Time Passwords and copy them to clipboard

PyPI package: ppotp

If you spot any problems or have any improvement ideas then feel free to open an issue and I will be glad to look into it for you.


A recommended way of installing the tool is pip install.

Once installed, a command line tool otp should be available in your system’s PATH.

pip install

The tool is available in PyPI and can be installed using pip:

$ pip install --user ppotp
$ otp --help


$ otp --help
usage: otp [--version] [--help] [--debug] key

Tool to generate One-Time Passwords and copy them to clipboard

positional arguments:
  key        key or service name from ~/.otpkeys

optional arguments:
  --version  show program's version number and exit
  --help     show this help message and exit
  --debug    debugging mode



Key file ~/.otpkeys

You can save your keys to ~/.otpkeys file using service=key format, for example:

$ cat ~/.otpkeys

Then you can generate OTP, by running:

$ otp {service}


$ otp aws

$ otp google

$ otp facebook

Auto copy OTP to clipboard

The tool attempts to automatically copy successfully generated code to the clipboard. It uses pyperclip module for cross-platform copying text to the clipboard.


$ otp cloud

At this point, provided your system supports it, the above OTP should be in the clipboard.

Copy to clipboard issue

Pyperclip uses various mechanisms to copy text to the clipboard. If your system is missing them, you may see a debug message that says:

Pyperclip could not find a copy/paste mechanism for your system.
For more information, please visit

Currently, this error should only appear on Linux (not Windows or Mac).

Please check the above guide for more information on how to fix this.

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 ppotp, version 2.2.0
Filename, size File type Python version Upload date Hashes
Filename, size ppotp-2.2.0-py2.py3-none-any.whl (7.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size ppotp-2.2.0.tar.gz (4.2 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