template
dominate
template | dominate | |
---|---|---|
4 | 11 | |
486 | 1,646 | |
- | - | |
5.4 | 4.6 | |
about 1 month ago | 11 days ago | |
TypeScript | Python | |
GNU General Public License v3.0 or later | GNU Lesser General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
template
-
That people produce HTML with string templates is telling us something
I’ve been using to avoid the whole “create DOM elements in JS” thing, and it’s been working well so far:
https://github.com/retrohacker/template
- Template – A simple framework for webapps
- Template – A Simple Framework for Webapps
-
React.dev
This is exactly what I'm doing with my personal "framework" I use for client contracts. It's just Web Components with a handy class based wrapper. I call it Template, since it's based off tags.
It's a joy to work in, feels "frameworky" but it's standard web standards with <100 lines of convenience JS wrapped around it. There is no magic beyond what the browser provides - I like I like it that way.
https://github.com/retrohacker/template/
It's "open source" as a reference. Just using it for myself. There aren't many docs beyond notes to myself. You're welcome to kick the tires. If you like it I'd entertain PRs and stuff but it's such a small library forking is probably entirely reasonable to make your own flavor too.
Cheers and happy hacking!
dominate
-
Ludic: New framework for Python with seamless Htmx support
It feels weird at the beginning, but after a bit of practice I found it pretty nice to write HTML in Python.
Here is an example of a HTML page layout written with the DOMinate [1] library for example, in a "JSX-like" way:
https://github.com/olivierphi/zakuchess/blob/main/src/apps/w...
It may hurt your eyes at first sight, for sure... But similarly to technologies like Tailwind CSS, it's mostly a matter of getting used to it - and after a while it end ups feeling very natural to use :-)
1: https://github.com/Knio/dominate#readme
-
C++: The Obvious Final Step
Pretty much how https://github.com/Knio/dominate does it, but no context variable binding (otherwise gets messy with lots of nesting)
-
That people produce HTML with string templates is telling us something
You're conflating two things, dynamically creating HTML is great and lets you avoid JS in a lot of cases. It's whether you should treat your HTML document as the tree of nodes that it is in your programming language or treat it like a string.
https://github.com/Knio/dominate is a Python lib that implements this principal.
-
Views / Templates / Custom Widgets ... I just want to display non editable data
Actually excited to giive this HTML field a try - https://github.com/Knio/dominate might come in useful for me to generate the html
-
htmx_gen
How is it different from other existing projects like Dominate?
-
Python and Web Developing
If you’re talking about generating HTML using Python, I highly recommend the library Dominate. Incredibly intuitive and Pythonic way to generate HTML.
- Lona - A web framework for responsive web apps in full python
- Template-less HTML rendering in Python
- What do you guys think of Dominate? Use cases?
-
I made a Python3 framework fro integrating Python with HTML and CSS
Ive mostly used Dominate for my services. https://github.com/Knio/dominate
What are some alternatives?
vtpl - Vtpl is a php template engine that ensures proper separations of concerns, the frontend logic is separated from presentation. The goal is to keep the html unchanged for better maintainability for both backend and frontend developers
domonic - Create HTML with python 3 using a standard DOM API. Includes a python port of JavaScript for interoperability and tons of other cool features. A fast prototyping library.
dream-html - Render HTML, SVG, MathML, htmx markup from your OCaml Dream backend server
wasmer-python - 🐍🕸 WebAssembly runtime for Python
htmlgo - A library for writing type-safe HTML in Golang
aiohttp-json-rpc - Implements JSON-RPC 2.0 using aiohttp
rfcs - RFCs for changes to React
ryact - Ryact(Breact but 10x faster): a react-like framework to build super-fast web apps in python.
helix - A simple, easy to use library for React development in ClojureScript.
tocbot - Build a table of contents from headings in an HTML document.
flog - Pre-Markdown static site generator based on UNIX tools and XSL
dashborg-go-sdk - Modern internal tools. Defined, controlled, and deployed directly from backend code. No JavaScript. Secure.