Metadata-Version: 2.1
Name: Pequena
Version: 0.0.17
Summary: Lightweight desktop app framework
Author: borecjeborec1
Author-email: <atzuki@protonmail.com>
Keywords: python
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Description-Content-Type: text/markdown
License-File: LICENSE

# Pequena
Pequena is a desktop creation framework that allows you to create desktop applications using web technologies such as HTML, CSS, and JavaScript. It is built on top of the [webview](https://pypi.org/project/pywebview/) library for Python.

## Installation
Pequena can be installed using pip
```bash
pip install pequena
```

## Usage
To use `Pequena`, first import it:
```python
import Pequena
```

Then call the `init` function to set up the client source directory and the window name:
```python
Pequena.init("path/to/client/index.html", "Hello World!")
```

You can then create a window using the `create_window` function:
```python
Pequena.create_window(width=800, height=600)
``` 

By default, Pequena uses the `EdgeHTML` backend for webview, but you can also use other backends such as `PyQt5`, `QtWebEngine`, and `Gtk`. But those will require additional installs

You can expose Python functions to your client-side JavaScript code by using the `expose_function` function:
```python
def my_function():
    return "Hello, World!"
Pequena.expose_function(my_function)
``` 

In your client-side JavaScript code, you can then call the Python function using the `PEQUENA` object:
```Javascript
const result = await PEQUENA.my_function();
```

## NodeJS wrapper
If you prefer to use Node.js instead of Python, you can use the [pequena](https://www.npmjs.com/package/pequena) wrapper library, which provides a Node.js API for Pequena.
I personaly advice you to use this if you know NodeJS. It has built in scripts for compiling/hot reload/etc...

## License
Pequena is licensed under the MIT License.
