$npx skillfedfor your agent

pyquery

A jquery-like library for python

Worth itPyPI HTMLReleased Jul 20262.0M downloads / moBSDPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pyquery-2.1.0-py3-none-any.whl
v2.1.0 · released 2026-07-27 · 2 runtime deps: lxml, cssselect

Yes. pyquery is actively maintained, has no known vulnerabilities, installs with low friction, and offers genuine convenience for HTML/XML work if you're comfortable with jQuery syntax. The permissive BSD license poses no barrier. Check release notes for breaking changes if upgrading from versions before 2.0.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction install with just two runtime dependencies (lxml and cssselect).
  • Actively maintained as of 2026-07-27 with recent releases and 2380 repository stars.

License · maintenance · safety

BSD (permissive) — BSD permissive license allows use in most commercial and open-source projects without significant restrictions.

last release 2026-07-27 (18 days) · last repo commit 2026-07-27 · 2,380 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,986,642 downloads/mo, #3,385 on PyPI

Verify before relying

pip install pyquery
from pyquery import PyQuery as pq
d = pq('<p id="hello" class="hello">Hello world!</p>')
print(d('#hello').text())
  • Whether cssselect 1.4.x pinning (mentioned in 2.0.2 release notes) remains a hard requirement or has been relaxed in 2.1.0
  • Specific Python version support floor for 2.1.0 (classifiers list 3.11, 3.12, 3.13 but minimum is unspecified)
Same gist for agents: .md · .json

What it is and what it does

pyquery is a Python wrapper around lxml that mimics jQuery's API for querying and manipulating XML and HTML documents. Instead of writing XPath or raw lxml code, you write familiar jQuery-style selectors and method chains to find elements, extract text, modify attributes, and transform DOM structures. It's particularly useful for web scraping and HTML parsing tasks where you want the convenience of jQuery syntax without leaving Python.

The library loads documents from strings, files, URLs, or existing lxml trees, then lets you traverse and modify them using pseudo-classes like :first, :last, :even, :odd, and :has(). Recent versions (2.0+) introduced breaking changes around URL auto-fetching and cssselect compatibility, so existing code may need updates when upgrading.

Use it for

  • Web scraping: extract data from HTML pages using CSS selectors instead of XPath expressions
  • HTML template manipulation: modify or generate HTML documents programmatically before serving
  • XML document transformation: query and rewrite XML files with a simpler API than raw lxml
  • Form data extraction: serialize form elements according to spec using built-in methods
  • DOM testing: verify HTML structure and content in automated tests with jQuery-like assertions

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

pyquery is actively maintained, has no known vulnerabilities, installs with low friction, and offers genuine convenience for HTML/XML work if you're comfortable with jQuery syntax. The permissive BSD license poses no barrier. Check release notes for breaking changes if upgrading from versions before 2.0.

Install

pyquery on PyPI

Before you install

Low friction install with just two runtime dependencies (lxml and cssselect). Actively maintained as of 2026-07-27 with recent releases and 2380 repository stars.

License in practice

BSD permissive license allows use in most commercial and open-source projects without significant restrictions.

Quickstart

pip install pyquery
from pyquery import PyQuery as pq
d = pq('<p id="hello" class="hello">Hello world!</p>')
print(d('#hello').text())

Verify before relying

  • Whether cssselect 1.4.x pinning (mentioned in 2.0.2 release notes) remains a hard requirement or has been relaxed in 2.1.0
  • Specific Python version support floor for 2.1.0 (classifiers list 3.11, 3.12, 3.13 but minimum is unspecified)

Package facts

LicenseBSD permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
lxmlcssselect
MaintenanceActively maintained 18 days since the last release
Last repo commit
First released
Downloads1,986,642 / month, #3,385 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Evidence: pyquery-2.1.0-py3-none-any.whl

Tags

Capabilities
jquery-like html parsing pythonxml document queryingcss selector html manipulationweb scraping with jquery syntaxlxml wrapper jquery apihtml dom traversal python
Topics
web-scrapinghtml-parsingdom-manipulation
PyPI keywords
jqueryhtmlxmlscraping

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 › “jquery-like html parsing python”

  • pyquerypyquery lets you query and manipulate XML and HTML documents using a…
  • HTMLParserProvides HTMLParser from Python 2.7 as a backport for Python 2.6…
  • html5libhtml5lib parses HTML documents into a tree structure conforming to…

Give your agent the search over MCP, or paste the wish link into any chat.

More HTML packages

MarkupSafe Worth it
PyPI · Dynamic Content · released Sep 2025

MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.

BSD-3-Clausecompiled wheel · 3.9+aging
797.1Mdownloads / mo
Jinja2 Worth it
PyPI · Dynamic Content · released Mar 2025

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.

BSD-3-Clausepure Python · 3.7+aging
718.6Mdownloads / mo
beautifulsoup4 Worth it
PyPI · Python Modules · released Jun 2026

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.

MITpure Python · 3.7.0+
432.1Mdownloads / mo
lxml Worth it
PyPI · Python Modules · released May 2026

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.

permissive licensecompiled wheel · 3.8+
416.8Mdownloads / mo
docutils With conditions
PyPI · Software Development · released May 2026

Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.

BSD-3-Clausepure Python · 3.9+
225.6Mdownloads / mo
Markdown Worth it
PyPI · Python Modules · released Jul 2026

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.

BSD-3-Clausepure Python · 3.10+
121.7Mdownloads / mo

See also cssselect · parsel · turbohtml · soupsieve · cssselect2 · itemloaders · html5lib · elementpath · pykml