Metadata-Version: 2.4
Name: webenginepy
Version: 1.2.3
Summary: Mini moteur web Python pour créer des sites web ultra simples sans framework
Author-email: GabiMinecraft02 <gabrielmeresse09@gmail.com>
License: MIT
Project-URL: Homepage, https://pypi.org/project/webenginepy/
Project-URL: Source, https://pypi.org/project/webenginepy/
Keywords: web,engine,http,site,minimal
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: License
Dynamic: license-file

# WebEnginePy

**WebEnginePy** est un module Python ultra simple conçu pour :  

- Les débutants  
- Les petits sites web  
- Créer un service HTTP sans framework complexe  

---

## installation
pip install webenginepy

### minimun
python <python 3.7
recommendé <python 3.8

## Fonctionnalités principales

- **`web.app`** : Déclare une page HTML (application)  
- **`web.route`** : Définit des routes pour boutons, fichiers statiques, etc.  
- **`web.tool`** : Ajoute des outils ou scripts Python qui modifient le HTML  

---

## structure 
engine.py (fichier principal) 
index.html (page principale)
pages/ (pages secondaires) 
server/ (fichiers statiques) 
tools/ (outils)

## notes
Les fichiers statiques doivent être accessibles via web.route("server/nom_du_fichier")

Les outils Python doivent définir une fonction apply(html) qui reçoit le HTML et retourne le HTML modifié

Le serveur supporte plusieurs requêtes simultanées grâce au multithreading et au cache pour accélérer le chargement

## Exemple d’utilisation

```python
import webenginepy as web

# Page principale
with web.app('/', "index.html"):
    web.route("server/style.css")  # CSS statique
    web.route("button:Dashboard", "/dashboard")  # bouton vers dashboard
    web.tool("hello")  # outil Python pour injecter du contenu

# Page secondaire
with web.app('/dashboard', "pages/dashboard.html"):
    web.route("server/style2.css")
    web.route("button:Accueil", "/")  # bouton vers page principale

# Lancer le serveur
web.run(port=5000, host="0.0.0.0")

