hybrid-foundation 0.0.1
Create an efficient and enjoyable work experience with pure Python
Requires Python: >=3.9

# Hybrid foundation 

<img src="./logo.png" width="100%"/>
<p align="center">
  <a href="https://ant.design">
    <img width="100" src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg">
  </a>
</p>

<h3 align="center">Hybrid with Ant Design UI</h1>

<p align="center">Create an efficient and enjoyable work experience</p>

![](https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*zx7LTI_ECSAAAAAAAAAAAABkARQnAQ)
<p>Hybrid empowers developers to effortlessly build real-time web, mobile, and desktop applications in Python, without requiring prior frontend experience.</p>
<p>It is an incredibly powerful Python library that allows you to create cross-platform graphical user interface and Web applications with ease, similar to Electronjs, but with an integrated React  and Ant Design user interface.</p>



### ⚡ From idea to app in minutes
<p>This feature makes Hybrid an ideal choice for creating sophisticated and comprehensive applications, catering to even the most demanding use cases.</p>
<p>At the heart of Hybrid's architecture are cutting-edge technologies such as React, FastAPI, Chrome, and Uvicorn, providing an excellent platform for building high-quality applications that seamlessly blend into any environment.</p>
<p>Hybrid also supports the Python ZVT 700 electronic cash register interface, allowing for seamless integration of other transactions into your applications. Additionally, Hybrid supports PWA Progressive Web Applications, enabling easy installation of your app on IOS and Android operating systems.</p>




### 🔋 Batteries included
<p>If you're looking for a robust and versatile library to create visually stunning applications, then Hybrid is undoubtedly the right choice. Explore the full potential of this exceptional library by giving it a try today!</p>
<a href="https://badge.fury.io/py/Hybrid"><img src="https://badge.fury.io/py/Hybrid.svg" alt="PyPI version" height="18"></a>
<a href='https://hybrid-document.readthedocs.io/en/latest/?badge=latest'>
    <img src='https://readthedocs.org/projects/hybrid-document/badge/?version=latest' alt='Documentation Status' />
</a>

### 📐 Simple architecture

No more complex architecture with JavaScript frontend, REST API backend, database, cache, etc. With Hybrid you just write a monolith stateful app in Python only and get multi-user, realtime Single-Page Application (SPA).
## Features

- browser-based graphical user interface
- standard GUI elements like label, button, checkbox, switch, slider, input, file upload, ...
- simple grouping with rows, columns, cards and dialogs
- general-purpose HTML and Markdown elements
- powerful high-level elements to
  - plot graphs and charts,
  - render 3D scenes,
  - get steering events via virtual joysticks
  - annotate and overlay images
  - interact with tables
  - navigate foldable tree structures
- notifications, dialogs and menus to provide state of the art user interaction
- shared and individual web pages
- ability to add custom routes and data responses
- capture keyboard input for global shortcuts etc.
- customize look by defining primary, secondary and accent colors
- live-cycle events and session data


## Usage

Write your Hybrid UI:

```python
from hybrid import interface
layout = interface.title(content='Hello World from Hybrid UI!')
app = interface.compiler(layout=[layout], globale_ui_style='main.css')
app.run()
 
   
```

```python


from hybrid import interface






if __name__ == '__main__':

    def main(data):
        print(data)

    d1 = interface.title(content='Hybrid with Ant Design UI', level=2)
    d2 = interface.slider(onChange=main)
    image = interface.image(src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg", alt='hallo', width='350px', height='350px')
    content = interface.content(content=[d1,d2, image])

    app = interface.compiler(layout=content,globale_ui_style='main.css')
    app.run()
 
   
```
<img width="50%" src="./antd.png">

```python
from hybrid import interface

# example with Button onclick

def main():
  print('Hallo')


layout = interface.button(text='Click', onclick=main)
app = interface.compiler(layout=[layout], globale_ui_style='main.css')
app.run()
 
   
```
```python
from hybrid import interface

# example with input onchange

def main(message):
  print(f'Hallo{message}')


layout = interface.input(placeholder='Click', onchange=main)
app = interface.compiler(layout=[layout], globale_ui_style='main.css')
app.run()
 
   
```
```python
from hybrid import interface

# example with slider onchage

def main(message):
  print(f'slider value{message}')


layout = interface.slider(onchange=main)
app = interface.compiler(layout=[layout], globale_ui_style='main.css')
app.run()
 
   
```
### In August 2023, Hybrid has just been publicly released by software architecture Ari Bermeki and is in Alpha stage.
Anyone can install and use Hybrid. There may be issues, but we are actively working to resolve them.