Skip to main content

Lightweight desktop app framework

Project description

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 library for Python.

NodeJS wrapper

If you can use Node.js, then you should use the pequena wrapper library, which provides a Node.js API for Pequena.

I personaly advice you to use this if you have node installed. It has built-in scripts for compiling/hot reload/bundling/minimising/etc...

Installation

Pequena can be installed using pip

pip install pequena

Usage

To use Pequena, first import it:

import Pequena

Then call the init_window function to set up the client source directory and the window name:

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:

Pequena.start_window()

By default, Pequena uses the EdgeChromium 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:

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:

const result = await PEQUENA.my_function();

License

Pequena is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Pequena-0.0.58.tar.gz (6.2 kB view hashes)

Uploaded Source

Built Distribution

Pequena-0.0.58-py3-none-any.whl (6.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page