Metadata-Version: 2.4
Name: easypyui
Version: 2.4.0
Summary: A simple and modern Python GUI library built on tkinter and ttk
Author: EasyPyUI
License: MIT
Project-URL: Homepage, https://pypi.org/project/easypyui/
Keywords: gui,tkinter,ttk,desktop,ui,python-gui
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: User Interfaces
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# EasyPyUI

**Build modern Python desktop GUIs with much less code than raw tkinter.**

EasyPyUI is a lightweight GUI library built on Python's standard `tkinter` and `ttk`.
It provides a short beginner-friendly API while keeping access to native Tk widgets.

## Installation

```bash
pip install easypyui
```

## Quick Start

```python
from easypyui import *

app("Hello EasyPyUI", 500, 400, appearance="dark")
title("Hello!")

name = minput("Name", placeholder="Your name")
mbutton("Say hello", lambda: notify("Hello " + name.get()))

fade_in(400)
run()
```

## Modern UI

EasyPyUI 2.x includes `mbutton()`, `minput()`, `mswitch()`, `mcard()`,
Light/Dark appearance and custom accent colors.

```python
app("Dashboard", 700, 500, appearance="dark", accent="#8b5cf6")
```

## Animation

```python
ring = progress_ring(20, size=110)
mbutton("Start", lambda: ring.animate_to(100, 1000))
fade_in(500)
```

Easing modes: `linear`, `ease_in`, `ease_out`, `ease_in_out`.

## Pages / Router

```python
from easypyui import *

app("Pages", 500, 350)

def home(ui):
    title("Home")
    on("Settings", lambda: go("settings"))

def settings(ui):
    title("Settings")
    on("Back", lambda: go("home"))

route("home", home)
route("settings", settings)
go("home")
run()
```

## Background Tasks

```python
def work():
    import time
    time.sleep(2)
    return "Done!"

run_task(work, done=lambda result: notify(result), loading_text="Working...")
```

## Native tkinter access

Most EasyPyUI wrapper objects expose `.tk`:

```python
btn = mbutton("Test", lambda: print("clicked"))
btn.tk.bind("<Button-2>", lambda event: print("middle click"))
```

## Classic API

The older API remains available, including `window()`, `text()`, `inputbox()`,
`button()`, `table()`, `canvas()` and `start()`.

## Requirements

- Python 3.9+
- tkinter support in your Python installation
- No mandatory third-party runtime GUI dependency

## License

MIT License

## Version

Current release: **2.4.0**

2.2.1 is a PyPI metadata and documentation update for the 2.2 series.


## 2.3 Productivity APIs

### Form validation

```python
f = form()

email = f.add(
    "Email",
    minput("Email"),
    [Validator.required(), Validator.email()]
)

password_box = f.add(
    "Password",
    minput("Password", password=True),
    [Validator.required(), Validator.min_length(8)]
)

def submit():
    ok, errors = f.validate()
    if ok:
        notify(str(f.values()))

mbutton("Submit", submit)
```

### Reactive State

```python
count = state(0)

label_widget = text("0")
count.bind_text(label_widget)

mbutton("+1", lambda: count.update(lambda n: n + 1))
```

### Keyboard shortcuts

```python
shortcut("ctrl+s", save)
shortcut("ctrl+q", close)
```

### Debounce / Throttle

```python
search = debounce(300, do_search)
resize_handler = throttle(100, update_layout)
```


## 2.4 Large Application Widgets

- `datatable()` — search, sorting and pagination
- `modal()` — modal window
- `drawer()` — collapsible side drawer
- `accordion()` — expandable sections
- `datepicker()` — date value input
- `notifications()` — notification center

```python
table = datatable(["name", "score"], ["Name", "Score"], page_size=5)
table.set_rows([
    ("Noah", 100),
    ("Daniel", 95),
])
```
