A Python suite for safe user inputs (SR) and automated fake data simulation (FR) using Faker.
Project description
SRinputs - Smart & Reliable Inputs Suite
A comprehensive Python suite designed to supercharge the built-in input() function. Whether you need to validate real user data or simulate fake information for testing, SRinputs has you covered.
Installation
pip install SRinputs
Modules
The package is now divided into two specialized modules:
- SRinputs (Static & Repetitive)Focuses on safe data collection from real users. It handles validation, language detection, and prevents common crashes.
-
Type Validation: Supports int, float, and str.
-
Safety: Catch KeyboardInterrupt and EOFError gracefully.
-
Persistence: Mandatory entries by default (no more empty inputs by mistake).
-
Bulk Collection: multiInput to gather lists of data easily.
- FRinputs (Fake & Random) Designed for developers and students. It "mocks" inputs using the Faker library, allowing you to test your classes and functions without typing a single word in the terminal.
-
Zero-Typing Testing: Simulates input automatically.
-
Realistic Data: Names (by gender), Emails, URLs, IDs, and Social Media Handles.
-
Customizable: Supports custom prompts and formats.
Usage Examples
Safe User Input (SR)
from SRinputs.SRinputs import IntInput, multiInput
# Validates an integer
age = IntInput("Please enter your age: ")
# Collects exactly 5 names in a list
names = multiInput(5, "Enter a student name: ")
Automated Testing / Mocking (FR)
Ideal for testing your classes without manual input:
from SRinputs.FRinputs import FRNameInput, FRHandleInput, FREmailInput
class User:
def __init__(self, name, handle, email):
self.name = name
self.handle = handle
self.email = email
# No terminal typing required! Data is generated and "injected" automatically.
user1 = User(
name = FRNameInput(),
handle = FRHandleInput(),
email = FREmailInput()
)
print(f"Created: {user1.name} ({user1.handle})")
Supported Types (FR Module)
| Function | Description |
|---|---|
| FRNameInput | Generates names (supports 'male', 'female', 'nonbinary'). |
| FRDateInput | enerates dates with multiple format options (0-3). |
| FRHandleInput | Generates social media handles like @name_123. |
| FRIdInput | Generates IDs (8-10 digits). |
| FREmailInput | Generates random email addresses. |
| FRUrlInput | Generates fake website links. |
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file srinputs-0.2.0.tar.gz.
File metadata
- Download URL: srinputs-0.2.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f791ef120d37ce41318638b0b557aeb3234358fa430aefd9b786b0362692786
|
|
| MD5 |
4ab89c7466d3b01319334bb97cbac991
|
|
| BLAKE2b-256 |
f19d296cbcf9fd1efccedbe59ec2ac0966260d89ae6504e2ff5a5cb0d6289271
|
File details
Details for the file srinputs-0.2.0-py3-none-any.whl.
File metadata
- Download URL: srinputs-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e05a175f58be14373f21bca9d966f18e5d72f512a749dd15697ab4298b1a7a9
|
|
| MD5 |
29212914090ce07b5bc22ff9e114b3ff
|
|
| BLAKE2b-256 |
63281853df4c9148abb4352ea277dca9dbbfcb979b883c0ad1b7077217f7f9cc
|