Skip to content

77AXEL/Webra

Logo

Open Source Platform Support License


Webra is a Python library that turns web technologies (HTML, CSS, JavaScript) into native desktop applications. It leverages CEF (Chromium Embedded Framework) to render your web content within a customizable window, bridging the gap between web development and desktop app creation.

Features

  • Web-to-Desktop: Render any local web application as a desktop app.
  • Modern UI/UX: Use modern web frameworks (React, Vue, etc.) or vanilla HTML/CSS/JS.
  • Python Integration: Seamlessly call Python functions from JavaScript.
  • Native Look & Feel: Customizable window frames, icons, and taskbar integration.
  • Standalone Builds: Compile your application into a single executable file using webra build.

Installation

You can install Webra directly from GitHub using pip:

pip install git+https://github.com/77axel/Webra.git

Usage

1. Initialize a Project

Create a new Webra project with a sample structure:

webra init myapp
cd myapp

This creates a myapp directory with a basic main.py and a src folder containing your web assets.

  • What the default app looks like:
demo.mp4

2. Configure Your App

Edit main.py to configure your application window:

from webra import Webra

app = Webra()
app.configure(
    title="My Awesome App",
    size=(1024, 768),
    src="src",
    icon="src/assets/icon.ico"  # Optional: Set a custom icon
)
app.run()

3. Build for Distribution

Compile your application into a standalone executable:

# Must be run inside your project directory
webra build

This uses Nuitka to compile your Python code and bundle your assets into a single .exe file (on Windows), located in the current directory.

License

This project is licensed under the MIT License - see the LICENSE file for details.