# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= python-premailer VERSION= 3.10.0 KEYWORDS= python VARIANTS= v12 v13 SDESC[v12]= Turns CSS blocks into style attributes (3.12) SDESC[v13]= Turns CSS blocks into style attributes (3.13) HOMEPAGE= https://github.com/peterbe/premailer CONTACT= Python_Automaton[python@ironwolf.systems] DOWNLOAD_GROUPS= main SITES[main]= PYPIWHL/b1/07/4e8d94f94c7d41ca5ddf8a9695ad87b888104e2fd41a35546c1dc9ca74ac DISTFILE[1]= premailer-3.10.0-py2.py3-none-any.whl:main DIST_SUBDIR= python-src DF_INDEX= 1 SPKGS[v12]= single SPKGS[v13]= single OPTIONS_AVAILABLE= PY312 PY313 OPTIONS_STANDARD= none VOPTS[v12]= PY312=ON PY313=OFF VOPTS[v13]= PY312=OFF PY313=ON DISTNAME= premailer-3.10.0.dist-info GENERATED= yes [PY312].RUN_DEPENDS_ON= python-lxml:single:v12 python-cssselect:single:v12 python-cssutils:single:v12 python-requests:single:v12 python-cachetools:single:v12 [PY312].USES_ON= python:v12,wheel [PY313].RUN_DEPENDS_ON= python-lxml:single:v13 python-cssselect:single:v13 python-cssutils:single:v13 python-requests:single:v13 python-cachetools:single:v13 [PY313].USES_ON= python:v13,wheel [FILE:2478:descriptions/desc.single] premailer ========= Looking for sponsors -------------------- This project is actively looking for corporate sponsorship. If you want to help making this an active project consider [pinging Peter] and we can talk about putting up logos and links to your company. Python versions --------------- Our `tox.ini `__ makes sure premailer works in: - Python 3.4 - Python 3.5 - Python 3.6 - Python 3.7 - Python 3.8 - PyPy Turns CSS blocks into style attributes -------------------------------------- When you send HTML emails you can't use style tags but instead you have to put inline style attributes on every element. So from this: .. code:: html

Peter

Hej

You want this: .. code:: html

Peter

Hej

premailer does this. It parses an HTML page, looks up style blocks and parses the CSS. It then uses the ``lxml.html`` parser to modify the DOM tree of the page accordingly. Warning! By default, premailer will attempt to download any external stylesheets by URL over the Internet. If you want to prevent this you can use the ``allow_network=False`` option. Getting started --------------- If you haven't already done so, install premailer first: :: $ pip install premailer Next, the most basic use is to use the shortcut function, like this: .. code:: python >>> from premailer import transform >>> print(transform(""" ... ... ... ...

Peter

...

Hej

... ... """))

Peter

Hej

[FILE:127:distinfo] 021b8196364d7df96d04f9ade51b794d0b77bcc19e998321c515633a2273be1a 19544 python-src/premailer-3.10.0-py2.py3-none-any.whl