pynliner
Python CSS-to-inline-styles conversion tool for HTML using BeautifulSoup and cssutils
Decision gist · record as of 2026-08-14
Yes, if you need CSS inlining and can tolerate an unmaintained package. The tool is simple, has no runtime dependencies, and carries no known vulnerabilities. However, verify compatibility with your Python version and library versions before relying on it in production, and be prepared to fork or patch it if issues arise.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Installation is straightforward with no runtime dependencies, but the package has been abandoned since 2017-01-10 with no updates since.
- No active maintenance or security patches should be expected.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it legally safe to adopt in most projects.
last release 2017-01-10 (3503 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 220,027 downloads/mo, #9,315 on PyPI
Alternatives
Verify before relying
pip install pynliner
from pynliner import Pynliner
html = '<style>p { color: red; }</style><p>Hello</p>'
result = Pynliner(html).run()
print(result)- Whether the package works reliably with modern Python versions despite classifiers listing only up to 3.5
- Current compatibility with recent versions of BeautifulSoup and cssutils
- Whether abandoned status has led to unresolved bugs or security issues in real-world use
What it is and what it does
Pynliner is a CSS-to-inline-styles converter for HTML documents. It takes HTML with external or embedded stylesheets and rewrites the CSS rules as inline style attributes on the matching elements, which is useful for email templates and contexts where external stylesheets cannot be loaded. The tool parses HTML with BeautifulSoup and CSS with cssutils, then applies the styles to produce a self-contained HTML document.
The package is classified as Production/Stable but has not been updated since 2017-01-10. It carries no runtime dependencies, making installation friction minimal. However, the long period without updates means no active support, bug fixes, or compatibility updates for modern Python or library versions.
Use it for
- Prepare HTML email templates by inlining CSS so styles render correctly in email clients that strip external stylesheets
- Convert web pages to self-contained HTML documents where external CSS references are not available or permitted
- Preprocess HTML for archival or offline distribution where stylesheet links cannot be resolved
- Embed styles directly into HTML snippets for use in contexts with strict Content Security Policy rules
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need CSS inlining and can tolerate an unmaintained package.
The tool is simple, has no runtime dependencies, and carries no known vulnerabilities. However, verify compatibility with your Python version and library versions before relying on it in production, and be prepared to fork or patch it if issues arise.
Install
pynliner on PyPI
Before you install
Installation is straightforward with no runtime dependencies, but the package has been abandoned since 2017-01-10 with no updates since. No active maintenance or security patches should be expected.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it legally safe to adopt in most projects.
Quickstart
pip install pynliner
from pynliner import Pynliner
html = '<style>p { color: red; }</style><p>Hello</p>'
result = Pynliner(html).run()
print(result)
Verify before relying
- Whether the package works reliably with modern Python versions despite classifiers listing only up to 3.5
- Current compatibility with recent versions of BeautifulSoup and cssutils
- Whether abandoned status has led to unresolved bugs or security issues in real-world use
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 3,503 days since the last release |
| First released | |
| Downloads | 220,027 / month, #9,315 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Topic :: Text Processing :: Markup :: HTML |
Evidence: pynliner-0.8.0-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “css to inline styles html”
- pynlinerConverts CSS stylesheets to inline styles in HTML documents, using…
- css-inlineInlines CSS from style and link tags directly into HTML element style…
- django-premailerA Django template tag that converts CSS blocks into inline style…
Give your agent the search over MCP, or paste the wish link into any chat.
More HTML packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.
Install it if you need to parse or extract data from markup documents.
lxml provides Python bindings to libxml2 and libxslt, enabling parsing, validation, and transformation of XML and HTML documents through an ElementTree-compatible API with support for XPath, XSLT, and schema validation.
Install it if you need robust XML/HTML parsing, validation, or transformation; avoid it only if you must stay pure-Python and can accept slower performance.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
Converts Markdown text to HTML using a Python implementation of John Gruber's Markdown specification, with support for extensions.
Install it if you need to parse Markdown in Python.
See also css-inline · cssutils · premailer · prettierfier · stylus · django-premailer · dict2css · html-text · turbohtml · libsass