| Crates.io | input_method |
| lib.rs | input_method |
| version | 0.1.0 |
| created_at | 2025-06-03 20:41:17.957635+00 |
| updated_at | 2025-06-03 20:41:17.957635+00 |
| description | A tiny Rust crate that provides a Python-like input() function for CLI apps. |
| homepage | |
| repository | https://github.com/had2020/input_method |
| max_upload_size | |
| id | 1699456 |
| size | 4,108 |
input_methodA tiny, opinionated Rust crate that brings a Python-style input method to your CLI apps. Ideal for quick scripts, REPLs, and simple text-based interactions.
This crate exists to provide one simple function: read user input from stdin, with an optional prompt. That’s it. Just like Python’s input().
Perfect for:
Add it to your Cargo.toml:
cargo add input_method
Basic usage
use input_method::input;
fn main() {
println!("What is your name!");
let name = input();
println!("Hello, {}", name);
}
Leave a star to be a star! ⭐
PRs welcome, keep it simple.