semvec/pypi-packages huggingface dataset:
reactivecli 1.0
A CLI framework library to build responsive console interfaces
Requires Python: >=3.7.1

# ReactiveCLI

ReactiveCLI is a CLI framework library to build responsive console interfaces.

- **Description:** ReactiveCLI makes it painless to create interactive interfaces on console. Change values, and states of components and they will simple update in your console menu. 
- **Components-Based:** Using prefab components or build your own component make things easier to recicle code and avoid repetition code process.

**Sumary**:

1. [Installation](#installation)
2. [Quick Start](#quick-start)
3. [Documentation](#documentation)
    1. [Core](#core)
    2. [Components](#components)

# Installation

Install ReactiveCLI with pip:

```bash
  pip install reactivecli
```
    
# Quick Start

After install ReactiveCLI with pip.

In your project create a `app.py` file and write a simple menu on it:
```python
#import component Title
from reactivecli import Title
#Create the menu callback
def menu():
    #Instantiate the Title component as menu_title
    menu_title = Title("Hello ReactiveCLI!")
    #Return a list with the components in desired order
    return [
        menu_title
    ]
```

In the main file of the project create a root, pass the app menu and True[*remove on final build*] as arguments.

Example in `main.py`:
```python
from reactivecli import create_root
import app
#Create root with the app menu and set dev mode to true
create_root(app.menu, True)
```

Now open the console and run your code with `python main.py` command.

This will be the expected output:

*TO BE WRITTEN*
## Documentation
ReactiveCLI have a simple use methodology based on components.

### Core
ReactiveCLI core methods and builders

#### create_root :
-Create a menu flow root from a menu callback-

Usage:
```python
from reactivecli import create_root
import app
create_root(app.menu, True)
```

| **arg**       | **type** | **description**                                                 |
|:--------------|:---------|:----------------------------------------------------------------|
| menu_callback | callable | Callback that returns a list with menu components.              |
| dev           | bool     | If true the files changed will be recompiled in execution time. |


### Components
ReactiveCLI are based on components. So to build up an application you need to know what components to use.

#### Input
Text container that can be editable in execution time and saved to use the value as you wish.

Usage:
```python
from reactivecli import Input, Text
def menu():
    name_input = Input()
    age_input = Input("value")
    return [
        Text("Insert your name:"),
        name_input,
        Text("Insert your age:"),
        age_input
    ]
```

*TO BE WRITTEN*