A lightweight server-side framework that lets you write Python logic directly inside your HTML. The simplicity of PHP, powered by the Python ecosystem.
<h1>Welcome</h1>
<wep>
import datetime
# Server-side logic
now = datetime.datetime.now()
# Output HTML directly
echo(f"""
<div class="card">
<p>Time: {now}</p>
</div>
""")
</wep>
Web Embedded Python bridges the gap between static HTML and full-stack web applications. Perfect for data science demos, internal tools, and rapid prototyping.
Just open a .wep file and start writing HTML.
Add a <wep> block
whenever you need logic. No new template language to learn.
Import Pandas, NumPy, Requests, or OpenAI. Since it runs server-side, you have access to the entire PyPI repository.
Built-in support for SESSION, _GET, and _POST variables. Handle user logins
and form data effortlessly.
No Webpack, no Babel, no complex build chains. The server parses your file and renders the output instantly.
Fully open source and community driven. Fork it, customize it, and deploy it anywhere Python runs.
The easiest way to build UI for your AI agents. Call LLM APIs directly from your HTML and render the response.
git clone web-embedded-python
Create your first index.wep
file
uv run main.py