Skip to main content

A simple webview client

Project description

justbe-webview

A light, cross-platform library for building web-based desktop apps with Python.

Installation

You can install justbe-webview using either uv (recommended) or pip:

# Using uv (recommended)
uv pip install justbe-webview

# Using pip
pip install justbe-webview

Example

import asyncio
from justbe_webview import (
    WebView,
    Options,
    ContentHtml,
    Notification,
)

async def main():
    config = Options(
        title="Simple",
        load=ContentHtml(html="<h1>Hello, World!</h1>"),
    )

    async with WebView(config) as webview:
        async def handle_start(event: Notification):
            await webview.eval("console.log('This is printed from eval!')")

        webview.on("started", handle_start)

if __name__ == "__main__":
    asyncio.run(main())

You can find more examples in the examples directory, including:

  • Loading URLs
  • Loading HTML content
  • Window size management
  • IPC (Inter-Process Communication)

Binary Management

On first run, the client will:

  1. Check for a cached binary in the user's cache directory
  2. If not found, download the appropriate binary for the current platform
  3. Cache the binary for future use

The exact cache location depends on your operating system:

  • Linux: ~/.cache/justbe-webview/
  • macOS: ~/Library/Caches/justbe-webview/
  • Windows: %LOCALAPPDATA%\justbe-webview\Cache\

Using a Custom Binary

You can specify a custom binary path using the WEBVIEW_BIN environment variable:

export WEBVIEW_BIN=/path/to/webview/binary
python your_app.py

When set, this will bypass the default binary resolution process.

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

justbe_webview-0.0.4.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

justbe_webview-0.0.4-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file justbe_webview-0.0.4.tar.gz.

File metadata

  • Download URL: justbe_webview-0.0.4.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for justbe_webview-0.0.4.tar.gz
Algorithm Hash digest
SHA256 214523f701c05f5fdaaebbc744b535cd71b00a9f967c4b767c5d3f3765a3c0b8
MD5 469a35f67d3e4b319ad8efc570ded59d
BLAKE2b-256 5e918c2b0e876ef13be4092170c168b9461ba8527b1f6dad6dfa51c12105d596

See more details on using hashes here.

Provenance

The following attestation bundles were made for justbe_webview-0.0.4.tar.gz:

Publisher: publish-python.yml on zephraph/webview

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file justbe_webview-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: justbe_webview-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for justbe_webview-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9975053b3b526323afea5aa8b33f637d10fdd9640d23460fbe278f62536aabc5
MD5 25e728f125d49b5e4e3c345a3acd67f1
BLAKE2b-256 9f20e778d825a8bc3cadcd6f8e0335db48442804ea18b85a95dd89f1b7432c6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for justbe_webview-0.0.4-py3-none-any.whl:

Publisher: publish-python.yml on zephraph/webview

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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