semvec/pypi-packages huggingface dataset:
otp-function 1.0.0
A simple Python library to generate numeric, alphabetic, or alphanumeric OTPs
Requires Python: >=3.6.0

# 🔐 Python OTP Generator

A simple and flexible One-Time Password (OTP) generator written in Python. Supports numeric, alphabetic, or alphanumeric OTPs with customizable length.

---

## 📋 Features

- Generate OTPs of any length
- Choose between:
  - Digits only (`0-9`)
  - Letters only (`a-z`, `A-Z`)
  - Alphanumeric (balanced mix of letters and digits)
- Handles invalid input with user-friendly error messages
- Randomly shuffles alphanumeric characters for better security

---

## 🧠 How It Works

The function `generate_otp()` takes three parameters:

```python
generate_otp(length, include_letters=True, include_digits=True)

from otp import generate_otp

print(generate_otp(6))                      # e.g., 'd4A1z9' - Alphanumeric (default)
print(generate_otp(6, True, False))         # e.g., 'kYtReX' - Letters only
print(generate_otp(6, False, True))         # e.g., '729184' - Digits only
print(generate_otp(6, False, False))        # Error: At least one of include_letters or include_digits must be True
print(generate_otp())                       # Error: specify a valid length for OTP
clipyx 0.2.1
A command line interface package.
Requires Python: >=3.9

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![Tests](https://github.com/G-Lauz/python-project-template/actions/workflows/test.yml/badge.svg)](https://github.com/G-Lauz/python-project-template/actions/workflows/test.yml)
[![Linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)

# CLIpy
A python package that eases the creation of command line interface tools. It's a simple wrapper around the `argparse` module that simplifies the creation of CLI tools.

## Features

- Simplifies the creation of CLI tools.
- Supports `argparse` arguments.
- `@clipy.App` decorator: Adds a command-line parser with usage and description.
- `@clipy.Command` decorator: Adds a command to the command-line parser.
- `@clipy.Option` decorator: Adds an option to the command-line parser.

## Usage

```python
import clipy


@clipy.App(usage="mypackage <command> [options] [arg] ...", description="A CLI app")
@clipy.Option("option1", help="A global option")
@clipy.Command("command1", usage="mypackage command1 [options] [arg] ...", description="A descritpion", options=[
    clipy.Option("option2", help="Help message"),
    clipy.Option("flag", help="Help message", action="store_true")
])
@clipy.Command("command2", usage="mypackage command2 [options] [arg] ...", description="A descritpion", options=[
    clipy.Option("option3", help="Help message", required=True)
])
def main(command: clipy.CommandDefinition):
    print(f"Command: {command.name}")
    print("Options:")
    for key, value in command.options.items():
        print(f"  {key}: {value}")

if __name__ == "__main__":
    main()  # pylint: disable=missing-kwoa
```

Then enjoy your CLI tool:

```bash
python script.py --help
python script.py --global-option1 arg1 --global-option2 arg2
python script.py command1 --help
python script.py --global-option command1 --option1 arg1
```

## Installation
```bash
pip install clipyx
```
From Github:
```bash
pip install git+https://github.com/G-Lauz/clipy.git@v0.1.0-pre0
```

Or clone the repository and install it manually:
```bash
git clone https://github.com/G-Lauz/clipy.git
cd clipy
pip install .
```