Skip to main content

Generate one time passwords

Project description


A command line interface for generating one time passwords as per RFC 4226 and RFC 6238


  • Python version 3.6.x and greater


The way to install otp-gen is to use pip

$ pip3 install otp-gen

Getting Started

You need to provision the secret key, issuer and rest of the details with the config command. Default values are shown if any.



You can request a new OTP with the get command. A progress bar appears next to the code to indicate expiry period of it. get continuously provides valid codes until killed.

Current configuration can be embedded in a QR code by using qrcode command.




otp-gen is under MIT license

Project details

Download files

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

Source Distribution

otp-py-0.5.tar.gz (8.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page