semvec/pypi-packages huggingface dataset:
easy-widgets 0.3
Make widget management in CLI easy
License: MIT
Requires Python: >=3.7
Keywords: curses, CLI, widgets

# Easy Widgets

**Easy Widgets** is a Python library designed to simplify widget management in CLI applications. It leverages the power of `urwid` to create dynamic and interactive command-line interfaces with ease.

## Features

- Simplifies the creation and management of CLI widgets.
- Supports Python versions 3.7 and above.
- Lightweight and easy to integrate into existing projects.

## Installation

You can install **Easy Widgets** via pip:

```bash
pip install easy_widgets
```

## Usage

Here’s a basic example of how to use **Easy Widgets**:

```python


from easy_widgets import * 

Application.init()

menu = Menu("Just exit now")
menu.addOption("OK", lambda b,p: Application.exit())


name = ""
times = 0 

def setName(x):
    global name 
    name = x
def setTimes(x):
    global times 
    times = x

w = Wizzard(menu)\
    .withChoices("Select number", "times", [(1, "one"), (2, "two")])\
    .withInput("Enter your name", "name")\
    .withParam("name", setName)\
    .withParam("times", setTimes)


w.show()

Application.run()
print(name * times)




```

Refer to the documentation for more advanced usage.

## Requirements

- Python >= 3.7
- `urwid` >= 3.0.0

## Development

### Setup

Clone the repository:

```bash
git clone https://github.com/fantastic001/easy_widgets.git
cd easy_widgets
```

Install dependencies:

```bash
pip install -r requirements.txt
```


## Contributing

Contributions are welcome! Please follow these steps:

1. Fork the repository.
2. Create a new branch (`git checkout -b feature-name`).
3. Commit your changes (`git commit -m "Add feature"`).
4. Push to the branch (`git push origin feature-name`).
5. Open a pull request.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.


## Links

- [GitHub Repository](https://github.com/fantastic001/easy_widgets)
- [PyPI Package](https://pypi.org/project/easy_widgets/)