Name | robust-input JSON |
Version |
1.0.1
JSON |
| download |
home_page | None |
Summary | A very comprehensive terminal input module with no external dependencies |
upload_time | 2025-07-14 07:36:31 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.12 |
license | MIT |
keywords |
input
terminal
validation
cli
command-line
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Robust Input Module
A comprehensive and robust input routine for command-line applications in Python. This module provides a highly configurable input function with advanced terminal control, validation, and user experience features.
## Features
### Core Input Capabilities
- **Real-time Character Input**: Character-by-character processing with immediate feedback
- **Cursor Movement**: Full left/right arrow key support for in-place editing
- **Backspace Support**: Delete characters with proper cursor positioning
- **Default Values**: Built-in default value handling with validation
- **Cross-platform**: Works in both terminal and non-terminal environments
### Advanced Validation System
- **Length Validation**: Minimum and maximum length constraints
- **Type Validation**: Automatic casting to int, float, bool, str, and custom types
- **Pattern Validation**: Regular expression pattern matching
- **Choice Validation**: Selection from predefined options
- **Custom Validators**: User-defined validation functions
- **Composite Validation**: Multiple validation layers applied sequentially
### Professional User Experience
- **Smart Error Display**: Errors appear below input line without scrolling
- **Persistent Error Messages**: Errors stay visible until next validation
- **Instant Feedback**: No artificial delays - immediate validation response
- **Screen Real Estate Reuse**: Cursor repositioning prevents screen clutter
- **Clean Terminal Management**: Proper terminal state restoration
### Security & Styling
- **Password Masking**: Secure input with asterisk masking
- **ANSI Styling**: Full color and text style support
- **Customizable Messages**: User-defined prompts and error messages
- **Graceful Degradation**: Fallback behavior for non-terminal environments
## Requirements
- Python 3.6+
- Linux/Unix environment (uses `termios` and `tty` modules)
- Standard library only (no external dependencies)
## Installation
Simply copy the `robust_input.py` file to your project directory.
## Usage
### Basic Examples
```python
import robust_input as ri
# Simple string input
name = ri.get_input(prompt="Enter your name")
print(f"Hello, {name}!")
# Integer input with validation
age = ri.get_input(
prompt="Enter your age",
target_type=int,
min_length=1,
max_length=3,
custom_validator=lambda x: 1 <= int(x) <= 120,
error_message="Age must be between 1 and 120"
)
# String input with length constraints
username = ri.get_input(
prompt="Choose a username",
min_length=3,
max_length=20,
allow_empty=False,
error_message="Username must be 3-20 characters"
)
# Choice selection
color = ri.get_input(
prompt="Select your favorite color",
choices=["red", "green", "blue", "yellow"],
default="blue",
error_message="Please choose from the available colors"
)
```
### Password and Security
```python
import robust_input as ri
# Password input with masking
password = ri.get_password(
prompt="Enter your password",
min_length=8,
pattern=r'^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$',
error_message="Password must be at least 8 characters with letters and numbers"
)
# Secure input with custom validation
def strong_password(pwd: str) -> bool:
return (len(pwd) >= 8 and
any(c.isupper() for c in pwd) and
any(c.islower() for c in pwd) and
any(c.isdigit() for c in pwd))
secure_pwd = ri.get_input(
prompt="Create a strong password",
is_password=True,
custom_validator=strong_password,
error_message="Password must have uppercase, lowercase, and numbers"
)
```
### Advanced Validation
```python
import robust_input as ri
import re
# Email validation
email = ri.get_input(
prompt="Enter your email",
pattern=r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$',
error_message="Please enter a valid email address"
)
# Custom validation function
def is_prime(value: str) -> bool:
try:
n = int(value)
if n < 2:
return False
for i in range(2, int(n**0.5) + 1):
if n % i == 0:
return False
return True
except ValueError:
return False
prime_number = ri.get_input(
prompt="Enter a prime number",
target_type=int,
custom_validator=is_prime,
error_message="Please enter a prime number"
)
# Multiple validation layers
user_id = ri.get_input(
prompt="Enter user ID",
target_type=int,
min_length=1,
max_length=10,
custom_validator=lambda x: int(x) > 0,
error_message="User ID must be a positive integer"
)
```
### Styling and Appearance
```python
import robust_input as ri
# Styled prompts and errors
styled_input = ri.get_input(
prompt="Enter something special",
prompt_style=[ri.InputStyle.BLUE, ri.InputStyle.BOLD],
input_style=[ri.InputStyle.CYAN],
error_style=[ri.InputStyle.RED, ri.InputStyle.BOLD],
error_message="ā Invalid input! Please try again."
)
# Colorful interactive menu
menu_choice = ri.get_input(
prompt="š® Choose your action",
choices=["start", "quit", "help"],
default="start",
prompt_style=[ri.InputStyle.GREEN, ri.InputStyle.BOLD],
input_style=[ri.InputStyle.YELLOW],
error_message="ā ļø Please choose 'start', 'quit', or 'help'"
)
```
### Convenience Functions
```python
import robust_input as ri
# Integer input with range validation
age = ri.get_integer(
prompt="Enter your age",
min_value=1,
max_value=120,
error_message="Age must be between 1 and 120"
)
# Choice from predefined options
color = ri.get_choice(
prompt="Select your favorite color",
choices=["red", "green", "blue", "yellow"],
default="blue"
)
# IP address validation
ip_address = ri.get_ip_address(
prompt="Enter server IP",
default="192.168.1.1"
)
# Password with built-in masking
password = ri.get_password(
prompt="Enter password",
min_length=8,
error_message="Password must be at least 8 characters"
)
```
### Error Handling and User Experience
```python
import robust_input as ri
# The input function handles all error display and cursor positioning
try:
# This will show errors below the input line, then reposition cursor
number = ri.get_input(
prompt="Enter an even number",
target_type=int,
custom_validator=lambda x: int(x) % 2 == 0,
error_message="ā Must be an even number!",
allow_empty=False
)
print(f"ā
You entered: {number}")
except KeyboardInterrupt:
print("\nš Goodbye!")
except Exception as e:
print(f"ā An error occurred: {e}")
```
## API Reference
### Main Function
#### `get_input(prompt, **kwargs) -> Any`
The primary function for collecting user input with comprehensive validation and styling.
**Parameters:**
- `prompt` (str): The prompt text to display to the user
- `default` (Optional[str]): Default value if user presses Enter without input
- `min_length` (Optional[int]): Minimum required length for input
- `max_length` (Optional[int]): Maximum allowed length for input
- `allow_empty` (bool): Whether to allow empty input (default: True)
- `target_type` (Type): Type to cast the input to (default: str)
- `pattern` (Optional[str]): Regular expression pattern for validation
- `choices` (Optional[List[str]]): List of allowed input values
- `is_password` (bool): Whether to mask input with asterisks (default: False)
- `prompt_style` (Optional[List[str]]): ANSI styles for the prompt
- `input_style` (Optional[List[str]]): ANSI styles for user input
- `error_message` (Optional[str]): Custom error message for validation failures
- `error_style` (Optional[List[str]]): ANSI styles for error messages
- `custom_validator` (Optional[Callable[[str], bool]]): Custom validation function
**Returns:** The validated and type-cast input value
**Raises:**
- `ValueError`: When validation fails (including default values)
- `KeyboardInterrupt`: When user presses Ctrl+C
### Convenience Functions
#### `get_password(prompt, **kwargs) -> str`
Collects password input with asterisk masking.
#### `get_integer(prompt, min_value=None, max_value=None, **kwargs) -> int`
Collects integer input with optional range validation.
#### `get_choice(prompt, choices, **kwargs) -> str`
Collects input from a predefined list of choices.
#### `get_ip_address(prompt, **kwargs) -> str`
Collects and validates IPv4 address input.
### Styling Classes
#### `InputStyle`
Provides ANSI color codes and text styles:
```python
# Colors
InputStyle.BLACK, InputStyle.RED, InputStyle.GREEN, InputStyle.YELLOW
InputStyle.BLUE, InputStyle.MAGENTA, InputStyle.CYAN, InputStyle.WHITE
# Text Styles
InputStyle.BOLD, InputStyle.UNDERLINE, InputStyle.RESET
```
#### `InputValidator`
Static methods for validation:
- `validate_length(value, min_len, max_len) -> bool`
- `validate_type(value, target_type) -> bool`
- `validate_pattern(value, pattern) -> bool`
- `validate_ip_address(value) -> bool`
- `validate_in_choices(value, choices) -> bool`
### Architecture
The module uses a clean architecture with separated concerns:
- **`InputHandler`**: Manages terminal interaction and character processing
- **`InputConfig`**: Encapsulates all configuration parameters
- **`InputValidator`**: Handles all validation logic
- **`InputStyle`**: Provides styling capabilities
## User Experience Features
### Smart Error Display
- Errors appear below the input line
- Error messages persist until next validation
- No screen scrolling or clutter
- Instant feedback without delays
### Terminal Control
- Character-by-character input processing
- Full cursor movement support (left/right arrows)
- Proper backspace handling
- Terminal state restoration
### Cross-Platform Support
- **Terminal mode**: Full features with ANSI escape sequences
- **Non-terminal mode**: Graceful fallback using standard `input()`
- **Automatic detection**: Seamlessly switches between modes
## Complete Examples
See the [examples/](examples/) directory for comprehensive usage demonstrations.
### Quick Example
```python
#!/usr/bin/env python3
"""Quick example demonstrating robust_input features."""
import robust_input as ri
def main():
# Basic input with validation
name = ri.get_input(
prompt="Enter your name",
min_length=2,
max_length=50,
error_message="Name must be 2-50 characters"
)
# Integer input with range validation
age = ri.get_integer(
prompt="Enter your age",
min_value=13,
max_value=120,
error_message="Age must be between 13 and 120"
)
# Choice selection with styling
theme = ri.get_choice(
prompt="Choose theme",
choices=["light", "dark", "auto"],
default="auto",
prompt_style=[ri.InputStyle.CYAN, ri.InputStyle.BOLD]
)
print(f"\nHello {name} (age {age}), using {theme} theme!")
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
print("\nGoodbye!")
```
## Development
### Architecture Highlights
- **Low Cognitive Complexity**: Refactored from 700% complexity to manageable levels
- **Separated Concerns**: Each class handles a specific responsibility
- **Comprehensive Testing**: Extensive validation and error handling
- **Professional UX**: Terminal-grade user experience
### Code Quality
- Type hints throughout
- Comprehensive docstrings
- Clean error handling
- Proper resource management
- Cross-platform compatibility
## Documentation
For comprehensive documentation, see the [`docs/`](docs/) directory:
- **[API Reference](docs/api-reference.md)** - Complete function and class documentation
- **[Developer Guide](docs/developer-guide.md)** - Development setup and contribution guide
- **[Architecture](docs/architecture.md)** - System design and implementation details
- **[Testing](docs/testing.md)** - Testing strategy and coverage analysis
- **[Examples](examples/)** - Real-world usage examples
## Testing
The library includes a comprehensive test suite with 69% coverage:
```bash
# Run tests
make test
# Generate coverage report
make coverage
# Run tests with verbose output
make test-verbose
```
**Test Coverage Summary:**
- 53 tests across all components
- Unit, integration, and mock testing strategies
- Comprehensive validation and error handling tests
- CI/CD integration with GitHub Actions
## Development
### Development Setup
```bash
# Clone repository
git clone <repository-url>
cd robust_input
# Setup environment
python -m venv venv
source venv/bin/activate
pip install coverage black isort flake8
# Verify setup
make validate
make test
```
### Development Commands
- `make test` - Run all tests
- `make coverage` - Generate coverage report
- `make lint` - Check code quality
- `make format` - Auto-format code
- `make clean` - Clean generated files
### Contributing
1. Fork the repository
2. Create a feature branch
3. Make changes with tests
4. Ensure all tests pass (`make test`)
5. Submit a pull request
See [Developer Guide](docs/developer-guide.md) for detailed contribution guidelines.
## License
This project is open source and available under the [MIT License](LICENSE).
Raw data
{
"_id": null,
"home_page": null,
"name": "robust-input",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "input, terminal, validation, cli, command-line",
"author": null,
"author_email": "tkirkland <tkirkland@users.noreply.github.com>",
"download_url": "https://files.pythonhosted.org/packages/b2/5a/2a5060ca68e91080f0ce6b041832561f0bddbe86685a99da1806abeeed98/robust_input-1.0.1.tar.gz",
"platform": null,
"description": "# Robust Input Module\n\nA comprehensive and robust input routine for command-line applications in Python. This module provides a highly configurable input function with advanced terminal control, validation, and user experience features.\n\n## Features\n\n### Core Input Capabilities\n- **Real-time Character Input**: Character-by-character processing with immediate feedback\n- **Cursor Movement**: Full left/right arrow key support for in-place editing\n- **Backspace Support**: Delete characters with proper cursor positioning\n- **Default Values**: Built-in default value handling with validation\n- **Cross-platform**: Works in both terminal and non-terminal environments\n\n### Advanced Validation System\n- **Length Validation**: Minimum and maximum length constraints\n- **Type Validation**: Automatic casting to int, float, bool, str, and custom types\n- **Pattern Validation**: Regular expression pattern matching\n- **Choice Validation**: Selection from predefined options\n- **Custom Validators**: User-defined validation functions\n- **Composite Validation**: Multiple validation layers applied sequentially\n\n### Professional User Experience\n- **Smart Error Display**: Errors appear below input line without scrolling\n- **Persistent Error Messages**: Errors stay visible until next validation\n- **Instant Feedback**: No artificial delays - immediate validation response\n- **Screen Real Estate Reuse**: Cursor repositioning prevents screen clutter\n- **Clean Terminal Management**: Proper terminal state restoration\n\n### Security & Styling\n- **Password Masking**: Secure input with asterisk masking\n- **ANSI Styling**: Full color and text style support\n- **Customizable Messages**: User-defined prompts and error messages\n- **Graceful Degradation**: Fallback behavior for non-terminal environments\n\n## Requirements\n\n- Python 3.6+\n- Linux/Unix environment (uses `termios` and `tty` modules)\n- Standard library only (no external dependencies)\n\n## Installation\n\nSimply copy the `robust_input.py` file to your project directory.\n\n## Usage\n\n### Basic Examples\n\n```python\nimport robust_input as ri\n\n# Simple string input\nname = ri.get_input(prompt=\"Enter your name\")\nprint(f\"Hello, {name}!\")\n\n# Integer input with validation\nage = ri.get_input(\n prompt=\"Enter your age\",\n target_type=int,\n min_length=1,\n max_length=3,\n custom_validator=lambda x: 1 <= int(x) <= 120,\n error_message=\"Age must be between 1 and 120\"\n)\n\n# String input with length constraints\nusername = ri.get_input(\n prompt=\"Choose a username\",\n min_length=3,\n max_length=20,\n allow_empty=False,\n error_message=\"Username must be 3-20 characters\"\n)\n\n# Choice selection\ncolor = ri.get_input(\n prompt=\"Select your favorite color\",\n choices=[\"red\", \"green\", \"blue\", \"yellow\"],\n default=\"blue\",\n error_message=\"Please choose from the available colors\"\n)\n```\n\n### Password and Security\n\n```python\nimport robust_input as ri\n\n# Password input with masking\npassword = ri.get_password(\n prompt=\"Enter your password\",\n min_length=8,\n pattern=r'^(?=.*[A-Za-z])(?=.*\\d)[A-Za-z\\d]{8,}$',\n error_message=\"Password must be at least 8 characters with letters and numbers\"\n)\n\n# Secure input with custom validation\ndef strong_password(pwd: str) -> bool:\n return (len(pwd) >= 8 and \n any(c.isupper() for c in pwd) and \n any(c.islower() for c in pwd) and \n any(c.isdigit() for c in pwd))\n\nsecure_pwd = ri.get_input(\n prompt=\"Create a strong password\",\n is_password=True,\n custom_validator=strong_password,\n error_message=\"Password must have uppercase, lowercase, and numbers\"\n)\n```\n\n### Advanced Validation\n\n```python\nimport robust_input as ri\nimport re\n\n# Email validation\nemail = ri.get_input(\n prompt=\"Enter your email\",\n pattern=r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$',\n error_message=\"Please enter a valid email address\"\n)\n\n# Custom validation function\ndef is_prime(value: str) -> bool:\n try:\n n = int(value)\n if n < 2:\n return False\n for i in range(2, int(n**0.5) + 1):\n if n % i == 0:\n return False\n return True\n except ValueError:\n return False\n\nprime_number = ri.get_input(\n prompt=\"Enter a prime number\",\n target_type=int,\n custom_validator=is_prime,\n error_message=\"Please enter a prime number\"\n)\n\n# Multiple validation layers\nuser_id = ri.get_input(\n prompt=\"Enter user ID\",\n target_type=int,\n min_length=1,\n max_length=10,\n custom_validator=lambda x: int(x) > 0,\n error_message=\"User ID must be a positive integer\"\n)\n```\n\n### Styling and Appearance\n\n```python\nimport robust_input as ri\n\n# Styled prompts and errors\nstyled_input = ri.get_input(\n prompt=\"Enter something special\",\n prompt_style=[ri.InputStyle.BLUE, ri.InputStyle.BOLD],\n input_style=[ri.InputStyle.CYAN],\n error_style=[ri.InputStyle.RED, ri.InputStyle.BOLD],\n error_message=\"\u274c Invalid input! Please try again.\"\n)\n\n# Colorful interactive menu\nmenu_choice = ri.get_input(\n prompt=\"\ud83c\udfae Choose your action\",\n choices=[\"start\", \"quit\", \"help\"],\n default=\"start\",\n prompt_style=[ri.InputStyle.GREEN, ri.InputStyle.BOLD],\n input_style=[ri.InputStyle.YELLOW],\n error_message=\"\u26a0\ufe0f Please choose 'start', 'quit', or 'help'\"\n)\n```\n\n### Convenience Functions\n\n```python\nimport robust_input as ri\n\n# Integer input with range validation\nage = ri.get_integer(\n prompt=\"Enter your age\",\n min_value=1,\n max_value=120,\n error_message=\"Age must be between 1 and 120\"\n)\n\n# Choice from predefined options\ncolor = ri.get_choice(\n prompt=\"Select your favorite color\",\n choices=[\"red\", \"green\", \"blue\", \"yellow\"],\n default=\"blue\"\n)\n\n# IP address validation\nip_address = ri.get_ip_address(\n prompt=\"Enter server IP\",\n default=\"192.168.1.1\"\n)\n\n# Password with built-in masking\npassword = ri.get_password(\n prompt=\"Enter password\",\n min_length=8,\n error_message=\"Password must be at least 8 characters\"\n)\n```\n\n### Error Handling and User Experience\n\n```python\nimport robust_input as ri\n\n# The input function handles all error display and cursor positioning\ntry:\n # This will show errors below the input line, then reposition cursor\n number = ri.get_input(\n prompt=\"Enter an even number\",\n target_type=int,\n custom_validator=lambda x: int(x) % 2 == 0,\n error_message=\"\u274c Must be an even number!\",\n allow_empty=False\n )\n print(f\"\u2705 You entered: {number}\")\n \nexcept KeyboardInterrupt:\n print(\"\\n\ud83d\udc4b Goodbye!\")\nexcept Exception as e:\n print(f\"\u274c An error occurred: {e}\")\n```\n\n## API Reference\n\n### Main Function\n\n#### `get_input(prompt, **kwargs) -> Any`\n\nThe primary function for collecting user input with comprehensive validation and styling.\n\n**Parameters:**\n- `prompt` (str): The prompt text to display to the user\n- `default` (Optional[str]): Default value if user presses Enter without input\n- `min_length` (Optional[int]): Minimum required length for input\n- `max_length` (Optional[int]): Maximum allowed length for input\n- `allow_empty` (bool): Whether to allow empty input (default: True)\n- `target_type` (Type): Type to cast the input to (default: str)\n- `pattern` (Optional[str]): Regular expression pattern for validation\n- `choices` (Optional[List[str]]): List of allowed input values\n- `is_password` (bool): Whether to mask input with asterisks (default: False)\n- `prompt_style` (Optional[List[str]]): ANSI styles for the prompt\n- `input_style` (Optional[List[str]]): ANSI styles for user input\n- `error_message` (Optional[str]): Custom error message for validation failures\n- `error_style` (Optional[List[str]]): ANSI styles for error messages\n- `custom_validator` (Optional[Callable[[str], bool]]): Custom validation function\n\n**Returns:** The validated and type-cast input value\n\n**Raises:** \n- `ValueError`: When validation fails (including default values)\n- `KeyboardInterrupt`: When user presses Ctrl+C\n\n### Convenience Functions\n\n#### `get_password(prompt, **kwargs) -> str`\nCollects password input with asterisk masking.\n\n#### `get_integer(prompt, min_value=None, max_value=None, **kwargs) -> int`\nCollects integer input with optional range validation.\n\n#### `get_choice(prompt, choices, **kwargs) -> str`\nCollects input from a predefined list of choices.\n\n#### `get_ip_address(prompt, **kwargs) -> str`\nCollects and validates IPv4 address input.\n\n### Styling Classes\n\n#### `InputStyle`\nProvides ANSI color codes and text styles:\n\n```python\n# Colors\nInputStyle.BLACK, InputStyle.RED, InputStyle.GREEN, InputStyle.YELLOW\nInputStyle.BLUE, InputStyle.MAGENTA, InputStyle.CYAN, InputStyle.WHITE\n\n# Text Styles\nInputStyle.BOLD, InputStyle.UNDERLINE, InputStyle.RESET\n```\n\n#### `InputValidator`\nStatic methods for validation:\n- `validate_length(value, min_len, max_len) -> bool`\n- `validate_type(value, target_type) -> bool`\n- `validate_pattern(value, pattern) -> bool`\n- `validate_ip_address(value) -> bool`\n- `validate_in_choices(value, choices) -> bool`\n\n### Architecture\n\nThe module uses a clean architecture with separated concerns:\n\n- **`InputHandler`**: Manages terminal interaction and character processing\n- **`InputConfig`**: Encapsulates all configuration parameters\n- **`InputValidator`**: Handles all validation logic\n- **`InputStyle`**: Provides styling capabilities\n\n## User Experience Features\n\n### Smart Error Display\n- Errors appear below the input line\n- Error messages persist until next validation\n- No screen scrolling or clutter\n- Instant feedback without delays\n\n### Terminal Control\n- Character-by-character input processing\n- Full cursor movement support (left/right arrows)\n- Proper backspace handling\n- Terminal state restoration\n\n### Cross-Platform Support\n- **Terminal mode**: Full features with ANSI escape sequences\n- **Non-terminal mode**: Graceful fallback using standard `input()`\n- **Automatic detection**: Seamlessly switches between modes\n\n## Complete Examples\n\nSee the [examples/](examples/) directory for comprehensive usage demonstrations.\n\n### Quick Example\n\n```python\n#!/usr/bin/env python3\n\"\"\"Quick example demonstrating robust_input features.\"\"\"\n\nimport robust_input as ri\n\ndef main():\n # Basic input with validation\n name = ri.get_input(\n prompt=\"Enter your name\",\n min_length=2,\n max_length=50,\n error_message=\"Name must be 2-50 characters\"\n )\n \n # Integer input with range validation\n age = ri.get_integer(\n prompt=\"Enter your age\",\n min_value=13,\n max_value=120,\n error_message=\"Age must be between 13 and 120\"\n )\n \n # Choice selection with styling\n theme = ri.get_choice(\n prompt=\"Choose theme\",\n choices=[\"light\", \"dark\", \"auto\"],\n default=\"auto\",\n prompt_style=[ri.InputStyle.CYAN, ri.InputStyle.BOLD]\n )\n \n print(f\"\\nHello {name} (age {age}), using {theme} theme!\")\n\nif __name__ == \"__main__\":\n try:\n main()\n except KeyboardInterrupt:\n print(\"\\nGoodbye!\")\n```\n\n## Development\n\n### Architecture Highlights\n- **Low Cognitive Complexity**: Refactored from 700% complexity to manageable levels\n- **Separated Concerns**: Each class handles a specific responsibility\n- **Comprehensive Testing**: Extensive validation and error handling\n- **Professional UX**: Terminal-grade user experience\n\n### Code Quality\n- Type hints throughout\n- Comprehensive docstrings\n- Clean error handling\n- Proper resource management\n- Cross-platform compatibility\n\n## Documentation\n\nFor comprehensive documentation, see the [`docs/`](docs/) directory:\n\n- **[API Reference](docs/api-reference.md)** - Complete function and class documentation\n- **[Developer Guide](docs/developer-guide.md)** - Development setup and contribution guide \n- **[Architecture](docs/architecture.md)** - System design and implementation details\n- **[Testing](docs/testing.md)** - Testing strategy and coverage analysis\n- **[Examples](examples/)** - Real-world usage examples\n\n## Testing\n\nThe library includes a comprehensive test suite with 69% coverage:\n\n```bash\n# Run tests\nmake test\n\n# Generate coverage report \nmake coverage\n\n# Run tests with verbose output\nmake test-verbose\n```\n\n**Test Coverage Summary:**\n- 53 tests across all components\n- Unit, integration, and mock testing strategies\n- Comprehensive validation and error handling tests\n- CI/CD integration with GitHub Actions\n\n## Development\n\n### Development Setup\n\n```bash\n# Clone repository\ngit clone <repository-url>\ncd robust_input\n\n# Setup environment\npython -m venv venv\nsource venv/bin/activate\npip install coverage black isort flake8\n\n# Verify setup\nmake validate\nmake test\n```\n\n### Development Commands\n\n- `make test` - Run all tests\n- `make coverage` - Generate coverage report\n- `make lint` - Check code quality\n- `make format` - Auto-format code \n- `make clean` - Clean generated files\n\n### Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make changes with tests\n4. Ensure all tests pass (`make test`)\n5. Submit a pull request\n\nSee [Developer Guide](docs/developer-guide.md) for detailed contribution guidelines.\n\n## License\n\nThis project is open source and available under the [MIT License](LICENSE).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A very comprehensive terminal input module with no external dependencies",
"version": "1.0.1",
"project_urls": null,
"split_keywords": [
"input",
" terminal",
" validation",
" cli",
" command-line"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "95a9b88393e672ffdcddd43cafb1c387fbd3d7a91cb3076745a393b1cf6192f5",
"md5": "cc2d1f1cd59e3a606339914a49c15a4d",
"sha256": "d36482294fd64552ca0f8d2eb366efd0ed7e94d41e8cf8e675454a7ffc82753e"
},
"downloads": -1,
"filename": "robust_input-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cc2d1f1cd59e3a606339914a49c15a4d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 15122,
"upload_time": "2025-07-14T07:36:30",
"upload_time_iso_8601": "2025-07-14T07:36:30.357500Z",
"url": "https://files.pythonhosted.org/packages/95/a9/b88393e672ffdcddd43cafb1c387fbd3d7a91cb3076745a393b1cf6192f5/robust_input-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b25a2a5060ca68e91080f0ce6b041832561f0bddbe86685a99da1806abeeed98",
"md5": "eb0f01faea5c1b576cd0b4fd21c20b35",
"sha256": "77ca7ac7b7b87fc7fb420c3b8b8c6018048698872fe8ee5524459fc1bc897ea8"
},
"downloads": -1,
"filename": "robust_input-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "eb0f01faea5c1b576cd0b4fd21c20b35",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 15156,
"upload_time": "2025-07-14T07:36:31",
"upload_time_iso_8601": "2025-07-14T07:36:31.303944Z",
"url": "https://files.pythonhosted.org/packages/b2/5a/2a5060ca68e91080f0ce6b041832561f0bddbe86685a99da1806abeeed98/robust_input-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-14 07:36:31",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "robust-input"
}