Metadata-Version: 2.4
Name: pywire-eel
Version: 0.1.0
Summary: PyWire is a lightweight Python library that allows you to create simple desktop GUI applications using HTML, CSS, and JavaScript, while giving full access to Python’s functionality and libraries.
Home-page: https://github.com/Fadi002/pywire-eel
Author: Fadi002
License: MIT License
        
        Copyright (c) 2025 Fadi1337
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

<!-- thanks to ChatGPT for the markdown xD -->
# PyWire 🚀

PyWire is a lightweight Python library that allows you to create simple desktop GUI applications using HTML, CSS, and JavaScript, while giving full access to Python’s functionality and libraries. It's designed to make cross-platform desktop app development with web technologies a breeze! ✨

## 💡 Inspiration

PyWire is heavily inspired by and aims to be compatible with the excellent [Eel project](https://github.com/python-eel/Eel). We've taken the core ideas and built upon them to provide a robust and easy-to-use solution for integrating Python with web frontends. Our goal is to offer a similar developer experience with additional features and optimizations. 🐍🌐

## 📦 Installation

You can install PyWire directly from PyPI:

```bash
pip install pywire-eel
```

Or from github
```bash
pip install git+https://github.com/Fadi002/PyWire
```

## 🌟 Features

- **Seamless Python-JavaScript Interoperability**: Call Python functions from JavaScript and vice-versa with ease. 🔄
- **Cross-Platform Compatibility**: Build apps that run on Windows, macOS, and Linux. 💻
- **Web Technologies**: Leverage your existing knowledge of HTML, CSS, and JavaScript to build beautiful UIs. 🎨
- **Lightweight & Fast**: Designed for performance and minimal overhead. ⚡
- **Eel-compatible API**: Familiar API for developers coming from the Eel ecosystem. 🤝

## 🚀 Getting Started

Here's a quick example to get you started:

```python
import pywire

@pywire.expose
def say_hello(name):
    print(f"Hello from Python: {name}!")
    return f"Hello, {name}! This is from Python."

pywire.init('web') # 'web' is the folder containing your HTML, CSS, JS files
pywire.start('index.html') # 'index.html' is your main HTML file
```

And in your `web/index.html`:

```html
<!DOCTYPE html>
<html>
<head>
    <script src="bridge.js"></script> <!-- This must be included in your html -->
    <title>PyWire App</title>
    <script type="text/javascript" src="/pywire.js"></script>
    <script type="text/javascript">
        async function callPython() {
            let result = await pywire.say_hello("World");
            document.getElementById('output').innerText = result;
        }
    </script>
</head>
<body>
    <h1>Welcome to PyWire!</h1>
    <button onclick="callPython()">Call Python Function</button>
    <p id="output"></p>
</body>
</html>
```

## 🤝 Contributing

We welcome contributions! If you'd like to contribute, please fork the repository and create a pull request. For major changes, please open an issue first to discuss what you would like to change. 💖

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. ©️


