Metadata-Version: 2.4
Name: browpy
Version: 0.0.1
Summary: A simple way to make beautiful GUIs in Python using CSS
Author: aamosk
License-Expression: Apache-2.0
Project-URL: Homepage, https://codeberg.org/aamosk/brow
Project-URL: Issues, https://codeberg.org/aamosk/brow/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: beautifulsoup4==4.15.0
Requires-Dist: Pillow==12.2.0
Requires-Dist: playwright==1.60.0
Dynamic: license-file

# brow
## A simple way to make beautiful GUIs in python, using CSS. which will make people raise their **brow**(s)
<br>


* Write your GUI in Python instead of HTML.
* Update GUI elements from Python too.
* Style using CSS.

## Install

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

### Example
```python
from brow import brow

app = brow(target_width=300)

app.lcss("""
    body { background: #0d1117; font-family: Arial, sans-serif; }
    .container { padding: 40px; text-align: center; }
    .count { font-size: 72px; font-weight: bold; color: #e6edf3; margin-bottom: 20px; }
    .btn { 
        display: inline-block; padding: 12px 40px;
        background: #238636; color: #ffffff;
        border-radius: 8px; font-size: 18px; cursor: pointer;
        margin: 6px;
    }
    .btn:hover { background: #2ea043; }
    .btn-red { background: #b62324; }
    .btn-red:hover { background: #da3633; }
""")

count = 0

container = app.add("div", class_="container")
label = container.add("div", str(count), class_="count")

def increment():
    global count
    count += 1
    label.text = str(count)
    app.render()

def decrement():
    global count
    count -= 1
    label.text = str(count)
    app.render()

container.add("div", "−", class_="btn btn-red").on_click(decrement)
container.add("div", "+", class_="btn").on_click(increment)

app.render()
app.start_loop()
```

## How it works
brow simply converts your Python elements to HTML, and renders it using a headless Firefox browser, displaying it in a Tkinter window. Yeah its weird and messy but it works.
