A Python package for generating random OTPs
Project description
Random OTP Generator
The random-otp package is a Python library for generating random OTPs of various types. It can generate numeric, alphabetic, or alphanumeric OTPs of a specified length.
Installation
You can install random-otp using pip:
sh pip install random-otp
Usage
To use random-otp, you can import the generate_numeric_otp, generate_alphabetic_otp, and generate_alphanumeric_otp functions from the random_otp.generator module:
python from random_otp.generator import generate_numeric_otp, generate_alphabetic_otp, generate_alphanumeric_otp
numeric_otp = generate_numeric_otp(6) # generates a 6-digit numeric OTP
alphabetic_otp = generate_alphabetic_otp(8) # generates an 8-character alphabetic OTP
alphanumeric_otp = generate_alphanumeric_otp(10) # generates a 10-character alphanumeric OTP
Alternatively, you can use the command line interface provided by the random-otp-generator script. To generate an OTP, run:
sh random-otp-generator You will be prompted to enter the length and type of OTP you want to generate.
License
This package is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file random-otp-1.0.0.tar.gz.
File metadata
- Download URL: random-otp-1.0.0.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de8480e1fe8c99ed352472d5e8f30127b76d3efc90ffa6d1b4c2a4072c45b013
|
|
| MD5 |
02f5a723fbe7ccd12b3e3b22a4ff0cf2
|
|
| BLAKE2b-256 |
917c2851cf60ea2bf09c3c027c258ca6dcbb1cd61d8bf94ab7cafcd9b64ab61f
|