Loading repository data…
Loading repository data…
prodev717 / repository
WEP (Web Embedded Python) is a lightweight server-side template engine and micro framework that lets you embed native Python directly in HTML using .wep files. Inspired by PHP, it enables rapid prototyping and AI-powered dynamic web content without separating frontend and backend layers.
WEP is a lightweight server-side template engine and micro-framework that lets you embed native Python directly inside HTML using
.wepfiles and<wep>tags. Inspired by PHP, WEP enables rapid prototyping and AI-powered dynamic web content — without the complexity of separate frontend/backend stacks or REST APIs.
<wep>...</wep> blocksecho() function_GET, _POST, _FILES, GLOBAL, and SESSION inside <wep> blocks for handling requests and session datagitpip (Python package manager)uv (modern Python package manager — install with pip install uv)Clone this repository:
git clone https://github.com/prodev717/web-embedded-python.git
Navigate to the project folder:
cd web-embedded-python
Install uv if you don’t already have it:
pip install uv
Install dependencies:
uv add flask
Run the server:
uv run main.py
Visit your app:
http://localhost:8000
web-embedded-python/
├── public/
│ ├── index.wep # Homepage with embedded Python
│ ├── demo.wep # Optional additional demo
│ └── style.css # Any static assets (CSS, JS, images)
└── main.py # Flask-based server
.wep Files.wep files are HTML with embedded Python blocks inside <wep>...</wep> tags:
<!DOCTYPE html>
<html>
<head><title>WEP Example</title></head>
<body>
<h1>Hello from WEP</h1>
<wep>
echo("<p>This is Python inside HTML!</p>")
import sys
echo(f"<pre>Python version: {sys.version}</pre>")
for i in range(3):
echo(f"<p>Loop: {i}</p>")
</wep>
</body>
</html>
<wep> must be zero-indented (start from column 0).<wep> tags are not supported.echo() function to write content to the HTML output..wep files are best for lightweight server-side logic, not heavy lifting.Need extra packages (e.g., requests, openai, pandas)?
Just run:
uv add package_name
Found a bug or have an idea? Feel free to open an issue or submit a pull request. Contributions welcome!
Licensed under the MIT License.
WEP is inspired by PHP's simplicity, adapted for the Python ecosystem. It’s perfect for Python devs who want to prototype fast — without learning a new frontend stack.