A cross-platform auto-suggest input package with enhanced features
Project description
AutoSuggest - Terminal Auto-Suggestion Tool
AutoSuggest is a Python terminal application that provides auto-suggestions based on user input. It is designed to enhance the user experience by offering real-time suggestions, making it easier to select names or other items.
Features
- Real-time auto-suggestions as you type.
- Supports both colored and plain text output.
- Works on Windows and Unix-based systems (Linux, macOS).
- Clear terminal interface.
Installation
To install AutoSuggest, simply use pip:
pip install autosuggest
Usage
You can run the AutoSuggest tool directly in your terminal. Here's an example of how to use it:
from autosuggest import AutoSuggest
# List of suggestions
names = ["Alice", "Bob", "Charlie", "David", "Edward", "Fiona", "George", "Hannah", "Ian", "Julia"]
# Customize your input message and whether to use colors
input_message = "Please type a name (Press Backspace to delete, ESC to exit): "
use_colors = True # Set to False to disable colors
# Create an instance of AutoSuggest
suggestion_tool = AutoSuggest(names, input_message, use_colors)
# Run the auto-suggest feature
selected_name = suggestion_tool.run()
print(f"You selected: {selected_name}")
Running the Tool
To execute the script, save it in a .py
file and run it from the command line:
python your_script_name.py
Replace your_script_name.py
with the name of your script.
Customization
- Input Message: Change the
input_message
variable to customize the prompt shown to the user. - Color Usage: Set the
use_colors
variable toTrue
to enable colored output orFalse
to disable it.
Contributing
Contributions are welcome! If you'd like to improve this project, please submit a pull request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contact
For any inquiries or support, please contact us at Ishan.kodithuwakku.official@gmail.com
Repository Views
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
File details
Details for the file autosuggest-1.1.1.tar.gz
.
File metadata
- Download URL: autosuggest-1.1.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be9e7af2cdb15a1e15f28a299df8ea7f53eb48796745d34d802878e698657a51 |
|
MD5 | 4a8e17edb5d727a8b7e23abb4d40377a |
|
BLAKE2b-256 | c1b47bace6941d9cf0163fa0c75668e2653caa13d4f19f3f4ffed894be7e5d12 |
File details
Details for the file autosuggest-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: autosuggest-1.1.1-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 840d8ec38f452075258711f6a416a3a12cbcc180ff989eeddee3cb27083e52ba |
|
MD5 | c9b5002a39a64ec79f0d7c207b6858d6 |
|
BLAKE2b-256 | d6cc126d45e1929b34c3d770fdff33ea3c3c13478445562896481646ce0e4acd |