Skip to main content

Readable Passcode

A human-readable passcode generator that creates secure, easy-to-remember passcodes using a combination of common words, numbers, and optional special characters.

Installation

You can install the package via PyPI using pip.

1. Install via PyPI

Run the following command to install the package:

pip install readable-passcode

2. Install from Source

Alternatively, you can install the package from the source code. First, clone the repository:

git clone https://github.com/dedenbangkit/readable-passcode.git
cd readable-passcode
pip install .

Example Usage

1. Using the Python API

You can use the passcode_generator function directly in your Python code to generate human-readable passcodes. Customize the number of words, the length of the random number, and whether or not to include a special character.

from readable_passcode import passcode_generator

# Generate a passcode with 4 words
passcode = passcode_generator(word=4)
print(passcode)  # Example output: 'apple-tree-cloud-mountain'

# Generate a passcode with 3 words and a 6-digit number
passcode = passcode_generator(word=3, number=6)
print(passcode)  # Example output: 'apple-tree-cloud-123456'

# Generate a passcode with 2 words, a 4-digit number, and a special character
passcode = passcode_generator(word=2, number=4, special_char=True)
print(passcode)  # Example output: 'apple-tree-1234$'

2. Using the Command Line Interface (CLI)

You can also generate passcodes directly from the command line. The CLI provides options to specify the number of words, number length, and whether to include a special character.

# Generate a passcode with the default 3 words
$ readable-passcode
apple-tree-cloud

# Generate a passcode with 4 words
$ readable-passcode --word 4
apple-tree-cloud-mountain

# Generate a passcode with 3 words and a 5-digit number
$ readable-passcode --word 3 --number 5
apple-tree-cloud-12345

# Generate a passcode with 2 words, a 4-digit number, and a special character
$ readable-passcode --word 2 --number 4 --special-char
apple-tree-1234$

CLI Options

--word: Specify the number of words in the passcode (default: 3).
--number: Add a random number of a given length at the end.
--special-char: Append a random special character to the passcode.

Key Features

  • Efficient Word Retrieval: Optimized for performance, allowing you to retrieve random words without needing to load the entire word list into memory, which is particularly useful for large datasets.
  • Command Line Interface (CLI) Support: Easily generate passcodes or retrieve random words directly from your terminal using simple CLI commands, making it convenient for quick use cases.
  • Lightweight Package: With a small package size, it ensures minimal overhead and fast installation times, making it suitable for resource-constrained environments or quick setups.
  • Customizable Passcode Generation: Supports generating human-readable passcodes with customizable options like word count, number length, and inclusion of special characters.
  • Cross-Platform Compatibility: Works seamlessly across different operating systems, including Linux, macOS, and Windows, whether used as a CLI tool or a Python package.
  • Extensible: Easy to integrate with other Python applications, making it a flexible tool for developers needing word-based randomization.
  • High Performance: Designed for both speed and memory efficiency, ensuring smooth performance even with high word retrieval frequencies or large-scale operations.

Release files for readable-passcode 1.0.1

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

Source distribution (sdist)

Source distribution for readable-passcode 1.0.1
File Size Uploaded
readable_passcode-1.0.1.tar.gz 21.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for readable-passcode 1.0.1
File Interpreter ABI Platform
readable_passcode-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 40.5 kB

Release files / readable_passcode-1.0.1.tar.gz

Download URL readable_passcode-1.0.1.tar.gz
Size 21.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6f93338ba47e80db1e9c53f87c3e1550dea4173eaae6bda0b5225dd06d54ee5d
BLAKE2b-256 checksum
How to use checksums
c814b87d3a9ec7b4dec62754380367becfc7648da700f1ccdc5c5135db16ea4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.7

Release files / readable_passcode-1.0.1-py3-none-any.whl

Download URL readable_passcode-1.0.1-py3-none-any.whl
Size 19.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f48734796f95036ef234a0cc9a4a042619697016f65deb5b7146fe2b085dbee
BLAKE2b-256 checksum
How to use checksums
4dc508551c0e0b0bbbe4529c097b261c6339436fdc7ed22bbdd12fd55fae19d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.7

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

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