An open API service indexing awesome lists of open source software.

https://github.com/77axel/webra

A Python library that turns web tech into desktop apps
https://github.com/77axel/webra

cef cefpython3 chromium chromium-embedded cross-platform desktop-app desktop-application electron-alternative framework gui html-css-javascript hybrid-app native-app python python-framework python-gui web-technologies webra webview wxpython

Last synced: 15 days ago
JSON representation

A Python library that turns web tech into desktop apps

Awesome Lists containing this project

README

          


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:

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

## Usage

### 1. Initialize a Project

Create a new Webra project with a sample structure:

```bash
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:

https://github.com/user-attachments/assets/73e8a5cc-f010-4d33-83ce-b54353761d5a

### 2. Configure Your App

Edit `main.py` to configure your application window:

```python
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:

```bash
# 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](LICENSE) file for details.