Packages
htag is a Python GUI toolkit for building web, desktop, and mobile applications from a single codebase using reactive components and HTML-like syntax.
htbuilder lets you construct HTML strings using Python function calls and operators instead of template syntax, supporting attributes, nested elements, and conditional rendering through pure Python code.
Converts HTML content to Word documents (.docx), with support for styling, tables, images, and metadata.
Install it if you need to convert HTML to Word documents; the main limitation is fidelity of complex CSS styling, which is inherent to the Word format itself.
Sanitizes HTML fragments by enforcing an allowlist of safe tags and attributes, removing inline styles and scripts, and normalizing structure to produce valid, consistent output.
However, the 410-day release cycle suggests limited active development; verify that its feature set and dependency versions align with your current stack before…
Parses HTML tables into nested lists of rows and cells without requiring external dependencies, stripping tags and extracting text content.
The AGPL-3.0-or-later license requires careful review for proprietary use.
Provides a curated list of valid HTML tag names across all HTML versions, from ancient tags like `nextid` to modern ones like `shadow` and `template`.
A unittest test runner that generates human-readable HTML reports of test results, including pass/fail/error/skip status for each test.
Install only if the feature set meets your needs and you're comfortable with no active development or support.
Extracts plain text from HTML while filtering out styles, scripts, comments, and normalizing whitespace intelligently to match browser rendering.
Converts HTML documents and HTML tables into JSON structures, optionally capturing element attributes, text values, and nested tags.
Converts real-world HTML—including malformed tags, broken entities, and nested tables—into clean CommonMark or Djot Markdown in a single call, with optional metadata extraction.
Provides a list of HTML void element tag names (self-closing tags like `br`, `img`, `input`) for validation or reference in HTML processing.
Converts valid HTML to Microsoft Word (.docx) format, returning a BytesIO object that can be written to disk or processed further.
However, dormant maintenance (last release January 2023) means you should verify that it works with your specific HTML/CSS requirements and check for any…
Generates PNG/image files from HTML, CSS, and URLs by wrapping headless browser rendering (Chrome, Chromium, or Edge).
Install only if you have a compatible browser (Chrome, Chromium, or Edge) available on your system; otherwise, the package will fail at runtime.
Converts HTML to clean, readable plain text or Markdown-formatted output, with options to customize link handling, escaping, and code block marking.
html5lib parses HTML documents into a tree structure conforming to the WHATWG HTML specification, the standard implemented by all major web browsers.
Parses HTML documents into tree structures compatible with RDFLib, implementing the WHATWG HTML specification and supporting multiple tree builders like xml.etree, lxml, and xml.dom.minidom.
However, the 653-day gap since last release combined with aging maintenance status suggests limited active development—suitable for stable use cases but verify that…
Generates HTML5 markup programmatically using Python syntax instead of templates or string concatenation, with no external dependencies.
Install it if you prefer writing HTML in Python code rather than templates.
Render HTML by writing Python code, using classes to represent tags and leveraging Python's syntax and object-oriented features instead of template languages.
However, note that the last release was in 2021; if you encounter bugs or need new features, community support may be limited.
Extracts original and updated publication dates from web pages by parsing HTML markup, metadata, and text content, with both Python API and command-line interfaces.
Install it if you need reliable date extraction from web pages; the fast mode offers good speed and the extensive mode provides high recall when accuracy matters most.
Converts HTML content into Microsoft Word documents (.docx format), either by adding HTML to existing documents or parsing HTML files and strings directly into new documents.
However, if you require active bug fixes, new HTML feature support, or compatibility assurance with the latest python-docx versions, consider whether the lack of…
Minifies HTML by removing unnecessary whitespace and comments while preserving functionality, with configurable safety options to prevent breaking changes.
Minifies HTML by removing unnecessary whitespace and comments while preserving functionality, with configurable safety features.
However, be cautious: the package is abandoned and may not work with Python versions released after 2021.
Provides HTMLParser from Python 2.7 as a backport for Python 2.6 environments to parse HTML documents.
Install only if you are maintaining legacy Python 2.6 code that cannot be upgraded—a scenario that should be extremely rare.
htmltools provides Python functions to programmatically create, manipulate, and serialize HTML documents and fragments.
Install it if you need to build HTML dynamically from code rather than using string templates or a heavier templating framework.
htpy lets you write HTML directly in Python using bracket syntax and Python expressions, generating valid HTML without a template language.
Intercepts and mocks HTTP requests made by the requests library, allowing you to test code that calls external APIs without making real network calls.
Implements encrypted content encoding for HTTP messages, allowing you to encrypt and decrypt HTTP request/response bodies using the standard HTTP Content-Encoding mechanism.
Provides a set of raisable exception classes corresponding to HTTP status codes, allowing you to raise semantic HTTP errors directly from application code instead of manually constructing responses.
Parses and serializes HTTP Structured Fields as defined by RFC 9651, converting between bytes and Python data structures (dictionaries, lists, items) with support for parameters and multiple field types.
Parses and serializes HTTP Structured Field Values according to the IETF specification, supporting Dictionary, List, and Item types with parameters and multiple value types.
Parses HTTP User-Agent strings to extract and identify the operating system and browser name and version.
httpbin is a Flask-based HTTP request and response service that provides endpoints for testing and debugging HTTP clients and libraries.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
A minimal, low-level HTTP client library providing thread-safe and task-safe connection pooling with support for HTTP/1.1, HTTP/2, sync and async interfaces, and HTTP(S) and SOCKS proxies.
httpdbg intercepts and displays HTTP(S) requests made by or received by Python programs, providing a web-based dashboard to inspect client and server traffic without code changes.
Install it if you regularly debug HTTP-based Python applications.
HTTPie is a command-line HTTP client that makes it easy to test, debug, and interact with APIs and HTTP servers using simple, human-friendly syntax with formatted and colorized output.
However, the project is dormant with no releases in 651 days—verify that PYSEC-2023-242 does not affect your use case and that dependencies remain compatible with…
httplib2 is an HTTP client library that handles HTTP and HTTPS requests with built-in support for caching, authentication, compression, and connection reuse.
However, for new projects, evaluate whether modern alternatives better fit your use case, as httplib2 is less commonly adopted today despite its maturity.
httpr is a fast HTTP client for Python built on Rust that provides both sync and async interfaces as a drop-in replacement for httpx and requests, with support for HTTP/2, streaming, and mTLS.
However, note that fine-grained error handling is not yet implemented, so error recovery patterns may differ from httpx/requests.
httpstan provides an HTTP REST interface to the Stan C++ library for Bayesian inference, allowing clients to compile Stan models and draw samples via HTTP requests rather than direct C++ calls.
httptools provides Python bindings for parsing HTTP requests and responses using the Node.js HTTP parser, plus URL parsing utilities.