
jvincipy — Python DSL for HTML
Build HTML and CSS programmatically in Python. Minimal, dependency-free, and designed for developers who love expressive code.
Key Features

HTML DSL
- • Full HTML5 tag coverage
- • SVG element support
- • Clean, readable rendering
- • `Tag` and `Markup` abstractions

CSS DSL
- • Python dict → CSS declarations
- • Nested selectors support
- • At-rules for media queries & keyframes
- • Pretty & minified render modes

CLI Tool
- • Render Python → HTML files
- • `--pretty` and `--minify` options
- • Auto-detects `page` or `render()`
- • Export to static HTML files

Flask Integration
- • Serve rendered pages dynamically
- • Use `Markup` for safe HTML injection
- • Perfect for micro web projects
- • Dependency-free (except Flask)
Installation
pip install jvincipy
Usage Examples
HTML DSL
from jvincipy import div, h1, p
page = div(
h1("Hello World!"),
p("This page was generated using jvincipy.")
)
print(page.render(pretty=True))CSS DSL
from jvincipy.css import Stylesheet, Rule
sheet = Stylesheet()
sheet.rules.append(Rule('body', {'margin': 0, 'color': 'black'}))
print(sheet.rules[0].render())Tech Stack
Core
- • Python 3
- • No external dependencies
- • Flask (only for example app)
Project Structure
- • jvincipy/core.py — core logic
- • jvincipy/tags.py — tag factories
- • jvincipy/css.py — CSS DSL
- • jvincipy/cli.py — CLI entrypoint