An open API service indexing awesome lists of open source software.

https://github.com/jkmnt/htmf

HTML in Python f-strings
https://github.com/jkmnt/htmf

f-strings html python

Last synced: 9 months ago
JSON representation

HTML in Python f-strings

Awesome Lists containing this project

README

          

# HTML in Python f-strings

## Introduction

htmf is a collection of utilities for writing HTML in Python f-strings. It works great for typed UI components.

Also it is the suite of tools to boost the developer experience:

- Pylint [plugin](https://jkmnt.github.io/htmf/lint) checking if expressions are HTML-safe and markup is not soup
- VSCode [syntax highlighter](https://jkmnt.github.io/htmf/highlight)
- HTML [formatter](https://jkmnt.github.io/htmf/format)

---

Read the [documentation](https://jkmnt.github.io/htmf)

---

## Installation

```shell
pip install htmf
```

## Working example

![example](docs/docs/soups.png)

Github markdown doesn't support the syntax highlight for htmf (yet :-), so it's presented as an image here.

[Documentation](https://jkmnt.github.io/htmf) site shows this example as proper code and
explains the ideas and motivation.


Logo by Alexander Kuliev