Metadata-Version: 2.4
Name: tiny_tui
Version: 0.0.1024
Summary: Tiny package for fast implementing the simpliest tui on Python
Author-email: fakemade <u.s.selivanov@mail.ru>
License-Expression: MIT
Project-URL: Homepage, https://github.com/fakemade/tiny_tui
Project-URL: Issues, https://github.com/fakemade/tiny_tui/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# <a id=tiny_tui>Tiny TUI</a>

A very small library with no dependencies, written in pure Python to create simple text interfaces (TUI) in Python.

<p>
  <a href="#tiny_tui-ru">Русская версия</a>
</p>

---

## What is Tiny TUI?

**Tiny TUI** is a small Python library for building simple menus and text interfaces without third-party dependencies.
It allows you to quickly and easily build menus and submenus, linking actions to them (if required).

---

## What is implemented at the moment

- Simple menu model and menu items
- Nested menus
- Navigation using arrows (color selection of the selected menu item)
- Use of parameters and settings (if any actions require input from the user)

---

## Installation

```bash
pip install tiny-tui
```

---

## Basic Example
At the moment, the library fills in keywords (such as "exit", "settings" and "back") in Russian. This will be fixed in the future.
```python
from tiny_tui import Menu, App


def hello(ctx):
    print("Hello, World!")

submenu: Menu = Menu(
	title="Submenu",
	items={
		"Do nothing": None
		}
)
head_menu: Menu = Menu(
	title="Main menu",
	items={
		"Call function": hello,
		"Go to submenu": submenu}
	)
app: App = App(head_menu=head_menu)
app.run()
```




## Project Status

**Early stage**

- API may change
- Feedback is welcome
- The project is intentionally kept small

---

## Contributing

Issues, ideas, and pull requests are welcome.

If you find a bug or have a suggestion:
- open an issue
- describe the use case
- keep it simple

---

## License

MIT License

---

<a id="tiny_tui-ru"></a>

# <a id=tiny_tui-ru>Tiny TUI(Русский)</a>

Очень маленькая библиотека без зависимостей, написанная на чистом Python для создания простых текстовых интерфейсов (TUI) на Python.

<p>
  <a href="#tiny_tui">English version</a>
</p>

---

## Что такое Tiny TUI?

**Tiny TUI** — это маленькая Python-библиотека для построения простых меню и текстовых интерфейсов без сторонних зависимостей.
Она позволяет достаточно быстрым и простым образом строить меню и подменю, привязывая к ним действия(если требуется).

---

## Что реализовано на данный момент

- Простая модель меню и пунктов меню
- Вложенные меню
- Навигация с помощью стрелок(цветовое выделение выбранного пункта меню)
- Использование параметров и настроек(если какие-то действия требуют ввода от пользователя)

---

## Установка

```bash
pip install tiny-tui
```

---

## Пример использования

```python
from tiny_tui import Menu, App


def hello(ctx):
    print("Привет, мир!")

submenu: Menu = Menu(
	title="Подменю",
	items={
		"Ничего не делать": None
		}
)
head_menu: Menu = Menu(
	title="Главное меню",
	items={
		"Выполнить функцию": hello,
		"Перейти в подменю": submenu}
	)
app: App = App(head_menu=head_menu)
app.run()
```
---
## Статус проекта
**Ранняя стадия разработки**
- API может меняться
- Обратная связь приветствуется
- Проект намеренно остаётся небольшим

---

## Участие в разработке

Идеи, баг-репорты и pull request'ы приветствуются.

---

## Лицензия

MIT License

