Skip to main content

Prepare HTML for email; embedd CSS to inline.

Project description

python-premailer converts HTML with style tags into HTML with inline style attributes; gmail won’t render nice without it!

I made it so I could send colorized git diffs of func-inventory around…

Use:

html = sys.stdin.read() premailer = Premailer(html) inlined_html = premailer.premail() print inlined_html

Excuses, excuses

This definitely already exists in pypi under the name ‘premailer’, but I wanted to reimplement it without the use of lxml.

Check it out! http://pypi.python.org/pypi/premailer

Inspired by

Emogrifier (php): http://www.pelagodesign.com/sidecar/emogrifier/

Premailer (ruby): http://premailer.dialect.ca/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-premailer-0.5.tar.gz (2.3 kB view details)

Uploaded Source

File details

Details for the file python-premailer-0.5.tar.gz.

File metadata

File hashes

Hashes for python-premailer-0.5.tar.gz
Algorithm Hash digest
SHA256 c2dcddd1d4b837b3d7c4d1ee2eb6cfac3c53c403769e6410687fd0406c8c938a
MD5 f5b20f5026d345f66a6dfffbeb807458
BLAKE2b-256 cfeab1f68595f18376990a9ab9485ec162f607d452100badc21026e1ea472ef0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page