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.2.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.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: justbe_webview-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 b7ed25a00aa85f4ad326321d9bf49f94e8be9384dfcab1dc5f525b025e02d7e3
MD5 f0ede49ca77336a0fa349ee27c9fe0ac
BLAKE2b-256 a93317691aad3d0749adceb266c54346d39fc3ed121a56c2a92bcaab1bb50904

See more details on using hashes here.

Provenance

The following attestation bundles were made for justbe_webview-0.0.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: justbe_webview-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 958554710a90e4eb9284e6b789b1c90b035247e2f758f24676f018227e53f38f
MD5 6f688909ec4eb3d16dcde0f27d7b72da
BLAKE2b-256 6302ebfe304c42bfee3745ececb0a942410e1cd676ed201ed17c08aff61f842b

See more details on using hashes here.

Provenance

The following attestation bundles were made for justbe_webview-0.0.2-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