Metadata-Version: 2.1
Name: Pequena
Version: 0.0.52
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.

## NodeJS wrapper
If you can use Node.js, then you should 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/bundling/minimising/etc...

## 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_window` function to set up the client source directory and the window name:
```python
Pequena.init_window("path/to/client/index.html", "Hello World!",width=800, height=600)
```

You can then create a window using the `start_window` function:
```python
Pequena.start_window()
``` 

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();
```

## License
Pequena is licensed under the MIT License.
