frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Pyfrontkit Update

2•Edybrown•1mo ago
Generating frontend from Python often involves more complexity than necessary, especially when integrating design with backend logic. Pyfrontkit (v1.1.10) is a Python library designed to reduce that friction. Its approach is based on three ideas: simplicity, efficiency and control. With Pyfrontkit, frontend is defined with significantly less code than traditional HTML + CSS. In many cases, the reduction exceeds 50% in written characters, reducing noise and potential error points. A single design definition can produce different outputs depending on the context: HTML + CSS written to disk In-memory generation Embedded or separated styles All from the same source. Templates are not passive files, but Python functions. They are encapsulated once and reused without creating multiple variants. Since templates are functions, they can receive arguments containing: data (content) design values (colors, styles, visual behavior) This allows the same template to adapt dynamically without duplicating code. Using a template introduces no additional friction: it is called like any regular Python function from backend logic, making integration with Python frameworks straightforward. The result is a simpler workflow with fewer layers, fewer concepts to learn and more control for the developer. Sharing a few img with visual examples of the flow in this version

Links: GitHub: https://github.com/Edybrown/Pyfrontkit PyPI: https://pypi.org/project/pyfrontkit/