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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file Pequena-0.0.58.tar.gz.

File metadata

  • Download URL: Pequena-0.0.58.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for Pequena-0.0.58.tar.gz
Algorithm Hash digest
SHA256 93eaf059a3c226a82998ecdc01671f3bf9dfa4e3a1c0755bd5c75f294e8e7a44
MD5 75c20632760ad777e6d65c28a19f1ecf
BLAKE2b-256 05187a3981f3593e4ef297215d339449708c19689d1aae9c8fe37626dead45ac

See more details on using hashes here.

File details

Details for the file Pequena-0.0.58-py3-none-any.whl.

File metadata

  • Download URL: Pequena-0.0.58-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for Pequena-0.0.58-py3-none-any.whl
Algorithm Hash digest
SHA256 46da9871cfff9ed430b140cfa388542b5a0877c2bf6c5dacfc4e55c1ac7ecee3
MD5 1b6a3104443632bae2557bfa2f6d971f
BLAKE2b-256 68a46fff16cc953f4f89006c2fef4980b724339389c90d557bcf84d9ea0c0892

See more details on using hashes here.

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