skillfed

lxml

Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API.

lxml Permissive license BSD-3-Clause Active 3,045 v6.1.1 released

Install

lxml on PyPI

pip

pip install lxml

uv

uv add lxml

poetry

poetry add lxml

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.8)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 87 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: lxml-6.1.1-cp310-cp310-macosx_10_9_universal2.whl; lxml-6.1.1-cp310-cp310-macosx_10_9_x86_64.whl; lxml-6.1.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; lxml-6.1.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; lxml-6.1.1-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; lxml-6.1.1-cp310-cp310-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl; lxml-6.1.1-cp310-cp310-manylinux_2_28_i686.whl; lxml-6.1.1-cp310-cp310-manylinux_2_31_armv7l.whl; lxml-6.1.1-cp310-cp310-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl; lxml-6.1.1-cp310-cp310-musllinux_1_2_aarch64.whl; lxml-6.1.1-cp310-cp310-musllinux_1_2_armv7l.whl; lxml-6.1.1-cp310-cp310-musllinux_1_2_riscv64.whl; lxml-6.1.1-cp310-cp310-musllinux_1_2_x86_64.whl; lxml-6.1.1-cp310-cp310-win32.whl; lxml-6.1.1-cp310-cp310-win_amd64.whl; lxml-6.1.1-cp310-cp310-win_arm64.whl; lxml-6.1.1-cp311-cp311-macosx_10_9_universal2.whl; lxml-6.1.1-cp311-cp311-macosx_10_9_x86_64.whl; lxml-6.1.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; lxml-6.1.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Information TechnologyOperating System :: OS IndependentProgramming Language :: CProgramming Language :: CythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: Markup :: HTMLTopic :: Text Processing :: Markup :: XML

About lxml

from the package's own PyPI description — quoted content, verbatim

lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It provides safe and convenient access to these libraries using the ElementTree API.

It extends the ElementTree API significantly to offer support for XPath, RelaxNG, XML Schema, XSLT, C14N and much more.

To contact the project, go to the project home page <https://lxml.de/>_ or see our bug tracker at https://launchpad.net/lxml

In case you want to use the current in-development version of lxml, you can get it from the github repository at https://github.com/lxml/lxml . Note that this requires Cython to build the sources, see the build instructions on the project home page.

After an official release of a new stable series, bug fixes may become available at https://github.com/lxml/lxml/tree/lxml-6.1 . Running pip install https://github.com/lxml/lxml/archive/refs/heads/lxml-6.1.tar.gz will install the unreleased branch state as soon as a maintenance branch has been established. Note that this requires Cython to be installed at an appropriate version for the build.

6.1.1 (2026-05-18)

Bugs fixed

  • The known link attributes in lxml.html.defs.link_attrs were...

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

lxml is a Pythonic binding for libxml2 and libxslt that provides XML and HTML processing with support for XPath, XSLT, XML Schema, and RelaxNG validation through the ElementTree API.

Medium install friction due to compiled C extensions; wheels are widely available for Python 3.8–3.14 across Linux, macOS, and Windows architectures. The project is actively maintained with a recent release (87 days old) and strong repository signals (3045 stars, last commit 2026-08-13).

BSD-3-Clause permissive license allows commercial and private use with minimal restrictions, requiring only preservation of copyright and license notices in distributions.

Usage

pip install lxml
from lxml import etree
root = etree.fromstring(b'<root><child>text</child></root>')
print(root[0].text)

Requires a C compiler and libxml2/libxslt development headers at build time if installing from source; pre-built wheels eliminate this for most platforms.

Verdict: lxml is a production-stable, actively maintained XML/HTML processing library with broad platform coverage and no known vulnerabilities. Medium install friction is offset by wheel availability and strong maintenance signals. Suitable for production use in XML-heavy applications.

Needs verification

  • Whether the xlink:href security fix in 6.1.1 affects existing deployments using lxml.html.defs
  • Performance characteristics compared to alternative XML libraries for specific use cases
xml parsing pythonxpath xslt processinghtml xml validationlibxml2 bindingelementtree xml schemaxslt transformationxml schema validation

Similar packages