Receptus
RRRRR EEEEE CCCCC EEEEE PPPPP TTTTT U U SSSSS
R R E C E P P T U U S
RRRRR EEEE C EEEE PPPPP T U U SSSSS
R R E C E P T U U S
R RR EEEEE CCCCC EEEEE P T UUU SSSSS
Receptus — from the Latin "received (text)" — is a Python CLI prompt toolkit built for humans.
It enables the creation of intelligent and secure terminal interfaces with advanced input features like:
- Option selection (single & multi)
- Free-form text input
- Input validation and transformation
- Fuzzy matching and auto-complete
- Password masking
- ANSI and ASCII-compatible output
- Timeout and retry handling
- Input history
- Event logging hooks (
on_event) - Quit/help commands
- Dynamic option lists
Installation
Receptus is a single-file drop-in module. Just copy receptus.py into your project.
You can also install it via PyPI or GitHub:
pip install receptus
pip install git+https://github.com/hustedev/receptus.git
Quick Start
from receptus import Receptus
prompt = Receptus()
color = prompt.get_input(
prompt="Choose a color:",
options={"r": "Red", "g": "Green", "b": "Blue"},
default="g"
)
print(f"You chose: {color}")
Features
Prompt with Options
options = {
"1": "Low",
"2": "Medium",
"3": "High"
}
choice = Receptus().get_input(
prompt="Select difficulty:",
options=options,
default="2"
)
Free Text + Validation + Transform
def validate_port(s):
try:
port = int(s)
return (0 < port < 65536, "Must be a valid port number")
except:
return (False, "Not a number")
def transform_port(s):
return int(s)
port = Receptus().get_input(
prompt="Enter port:",
allow_free_text=True,
validator=validate_port,
transformer=transform_port
)
Multi-Select
files = Receptus().get_input(
prompt="Select files:",
options={"1": "fileA", "2": "fileB", "3": "fileC"},
allow_multi=True,
min_choices=1,
max_choices=2
)
Fuzzy Match & Auto-Complete
name = Receptus().get_input(
prompt="Enter country:",
options={"us": "USA", "uk": "United Kingdom", "uae": "United Arab Emirates"},
fuzzy_match=True,
auto_complete=True
)
Password Masking + Timeout
secret = Receptus().get_input(
prompt="Enter password:",
mask_input=True,
timeout_seconds=15
)
Event Logging via on_event
def logger(event_type, ctx):
print(f"[{event_type}] -> {ctx}")
Receptus(on_event=logger).get_input(
prompt="Choose something:",
options={"1": "One", "2": "Two"},
)
Return Formats
You can control what get_input() returns:
return_format="key" # (default) -> "1"
return_format="value" # -> "One"
return_format="tuple" # -> ("1", "One")
Environment Variables
FORCE_ASCII=1— disables Unicode outputNO_COLOR=1— disables ANSI color
License
MIT License — do anything you want, but attribution appreciated.
(c) 2025 James Husted — james@husted.dev
🚧 Roadmap
- PyPI release
- TypeScript wrapper for Node CLI tools
- Native zsh/bash integration helpers
- Dynamic theming
Contributing
Pull requests welcome! Just fork, branch, and submit.
Metadata
Release files for receptus 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| receptus-0.1.5.tar.gz | 21.3 kB | With provenance | Details for receptus-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| receptus-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for receptus-0.1.5-py3-none-any.whl |
Total release size: 31.9 kB
Release files / receptus-0.1.5.tar.gz
| Download URL | receptus-0.1.5.tar.gz |
|---|---|
| Size | 21.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aea4d98d722252e1189ed53be5f25be68575a9a0f2449d2d181d9f5c74216caf
|
|
BLAKE2b-256 checksum How to use checksums |
c6b4f9a04e99c2d46eb20f822bcb604d1d466afbe188a31f47e624606ba22584
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 19, 2026.
Transparency logRelease files / receptus-0.1.5-py3-none-any.whl
| Download URL | receptus-0.1.5-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f882c22ff7541d6aeece23250f349364045a3f95da833f5390edd3727cc5121
|
|
BLAKE2b-256 checksum How to use checksums |
d89c7b9732e3bab98e0bde7a8a314f506d5c8db5fef6805b077d612db10798b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 19, 2026.
Transparency logSecurity for receptus 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for receptus-0.1.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.