{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/4"},{"label":"WWW/HTTP","url":"https://skillfed.io/packages/category/internet-www-http/2"},{"label":"Communications","url":"https://skillfed.io/packages/category/communications"},{"label":"Other/Nonlisted Topic","url":"https://skillfed.io/packages/category/other-nonlisted-topic"}],"enrichment":{"capability":"Converts CSS style blocks into inline style attributes on HTML elements, making HTML suitable for email clients that don't support style tags.","skillfed_tags":["email-processing","html-transformation","css-inlining"],"use_cases":["Prepare HTML newsletters and transactional emails for delivery by inlining all styles before sending.","Convert relative URLs in email templates to absolute URLs using a base_url parameter.","Strip !important declarations and pseudoclasses from CSS to ensure compatibility with email clients.","Process HTML templates from a file or stdin via the command-line interface for CI/CD pipelines.","Preserve specific CSS or links (e.g., handlebar syntax, cid: attachments) while inlining other styles."],"what_it_does":"Premailer is a Python library that transforms HTML documents by inlining CSS styles into HTML element attributes. It parses HTML, extracts CSS from style blocks and external stylesheets, and rewrites the DOM to apply those styles as inline style attributes\u2014a requirement for most email clients, which strip out style tags for security reasons.\n\nThe package handles relative URL rewriting (converting relative links to absolute ones using a base URL), CSS selector parsing via cssutils and cssselect, and HTML parsing via lxml. It offers both a simple transform() function for basic use and a full Premailer class for advanced configuration. It can preserve or strip certain CSS features (pseudoclasses, !important declarations, class attributes) and supports command-line usage for batch processing.","worth_installing":"Yes, if you are building email systems. Premailer solves a real, specific problem\u2014email clients require inline styles\u2014and does it reliably. The dormant maintenance is a minor concern given the stable classifier and zero known vulnerabilities, but verify that its CSS and HTML parsing behavior still meets your email client compatibility needs before adopting it for new projects."},"id":"premailer","links":{"html":"https://skillfed.io/packages/premailer","md":"https://skillfed.io/packages/premailer.md","pypi":"https://pypi.org/project/premailer/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2021-08-02","license_spdx":null,"license_treatment":"permissive","name":"premailer","python_support":"unspecified","summary":"Turns CSS blocks into style attributes"},"popularity":{"monthly_downloads":5013987,"position":2181,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"3.10.0"}
