Metadata-Version: 2.2
Name: selecto
Version: 1.0.4
Summary: Simple, colorful, multi-mode TUI that requires no boilerplate
Home-page: https://github.com/manuel/selecto
Author: Manuel Germanos
Author-email: manuel@example.com
License: MIT
Description-Content-Type: text/markdown

# Selecto

Selecto is a colorful, simple-to-use Text User Interface (TUI) library that requires just **1 line of code** to get started. It's designed to make building beautiful and interactive CLI apps a breeze.

## Features
- Easy to use.
- Colorful and interactive interface.
- Requires only 1 line of code to run.
- **No external dependencies** – everything you need is built-in.
- **Dual mode**: Select one item or multiple items.
  - **Single mode**: Select a single item and return it.
  - **Multiple mode**: Select multiple items and return them as a list.

## Installation

You can install Selecto via pip:

``` bash
pip install selecto
```

## Usage

To control selecto, arrow keys provide navigation:
arrow up and down to move a single row
arrow left and right to move multiple rows (number of rows configurable)
return key to select item in single selection mode
space key to toggle item and return key to confirm selections in multiple selection mode
Q to exit

To start selecto in the single selection mode (default mode):

``` python
from selecto import selecto

choice=selecto(list(range(50)))

if choice is not None:
    print(choice)
```

To start selecto in multiple selection mode:
``` python
from selecto import selecto

choice=selecto(list(range(50)),select_multiple=True) # by default value set to False

if choice is not None:
    print(choice)
```

To change the number of rows left and right arrow keys jump:

``` python
from selecto import selecto

choice=selecto(list(range(50)),multi_index_jump=25) # default is 5

if choice is not None:
    print(choice)
```

Selecto has randomized messages on exit or errors, to disable them:

``` python
from selecto import selecto

choice=selecto(list(range(50)),exit_messages=False) # True by default, False replaces all messages with generic messages

if choice is not None:
    print(choice)
```
