Mini moteur Python pour créer des sites web ultra simples
Project description
webenginepy
Mini moteur web ultra simple en Python pour :
les débutants
créer des sites ultra légers
sans framework ni API complexe
Installation pip install webenginepy
Exemple d’utilisation engine.py (fichier principal) import webenginepy
Déclarer la page principale
webenginepy.app("/", "index.html")
Déclarer des pages secondaires
webenginepy.app("/about", "pages/about.html")
/about = nom de la page
pages/about.html = chemin du fichier
Déclarer des outils
webenginepy.tool("seo") # 'seo' = nom de l'outil placé dans tools/seo.py
Démarrer le serveur
webenginepy.run(host="0.0.0.0", port=8000)
Exemple d’outil (plugin)
tools/seo.py
def apply(html: str) -> str: """Ajoute une meta description pour le SEO""" return html.replace( "", "\n" )
Structure de base du projet project/ ├── engine.py # fichier principal ├── index.html # page principale ├── pages/ # pages secondaires │ └── about.html ├── server/ # fichiers statiques (CSS, JS, images…) │ └── style.css └── tools/ # outils / plugins └── seo.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file webenginepy-0.1.1.tar.gz.
File metadata
- Download URL: webenginepy-0.1.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17592dd39476f8a96530795cd70282b281a304457c692db4fea35b80e27f13b4
|
|
| MD5 |
ec7956dab8f2343ce5faa93695538869
|
|
| BLAKE2b-256 |
cb7bc798d9345ae09aca16e0a1bb8e4d84bf9b42eee7232a7ff4238f566b83b6
|
File details
Details for the file webenginepy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: webenginepy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75e873c3236e1bd45bd053efdcbeed7ef5f86faa4de51f3bab02c54be943198c
|
|
| MD5 |
5d133feaf839257e8734ba26664f8666
|
|
| BLAKE2b-256 |
088b3cfeb79adf2756666ce6ca6dbe2aaf6970b606ec5c66ac89eabcafd66a81
|