peterbe/premailer
Turns CSS blocks into style attributes observed · 2026-08-28
Health v2 · maintenance only
32/100
- Activity 0
- Release rhythm 35
- Longevity 100
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 6258
- days_rel: n/a
- days_push: 991
- n_releases_24m: 0
Adoption not part of the score
1083 stars · 185 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A Python library that transforms HTML email markup by converting <style> blocks and external stylesheets into inline style attributes on each element. It uses lxml to parse and modify the DOM, with options for handling pseudo-classes, external CSS, and email-client quirks.
Use cases
- inline css for html emails
- convert style tags to style attributes
- prepare email templates for outlook and gmail
- make html newsletters email-client compatible
- inline external stylesheets in html
- remove class attributes after inlining css
When to choose
- sending HTML emails where <style> tags are unsupported
- automating email template preprocessing in Python
- needing fine-grained control over CSS inlining behavior
When to avoid
- styling regular web pages rather than emails
- you need a maintained project with recent releases
- non-Python stacks (use a Node or Ruby equivalent instead)
Facets
library · maturity maintenance
templating email parser email web-development frontend python cross-platform css-inlining html-email lxml
3 sources
- readme: https://github.com/peterbe/premailer · fetched 2026-08-28 · 0186f05d1314
- homepage: https://premailer.io · fetched 2026-08-29 · dd9498d22b85
- registry_pypi: https://pypi.org/pypi/premailer/json · fetched 2026-08-29 · cc3d26604306
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| peterbe/premailer | main | 32 |
For agents
markdown · JSON · MCP: product_card(name="peterbe/premailer")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem