Registry / data / inscriptis

inscriptis

JSON →
library2.7.1pypypi✓ verified 35d ago

Inscriptis is a Python-based HTML to text conversion library, command line client, and Web service (v2.7.1). It specializes in providing high-quality, layout-aware text representations of HTML content, including support for nested tables and a subset of CSS, and offers optional annotated output. The library is actively maintained with regular releases addressing new Python versions and feature enhancements.

datahttp-networking
Install & Compatibility
Where this runs
tested against v2.7.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.940 runs
installs and imports cleanly · install 0.0s · import 0.102s · 48.7MB
glibc
py 3.103.940 runs
installs and imports cleanly · install 3.8s · import 0.097s · 48MB
47MB installed
● package 47MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

from inscriptis import get_text

Convert HTML from a URL to plain text, preserving layout and structure. The example fetches content from 'https://www.informationscience.ch' and prints its text representation.

import urllib.request from inscriptis import get_text url = "https://www.informationscience.ch" try: with urllib.request.urlopen(url) as response: html_content = response.read().decode('utf-8') except Exception as e: html_content = f"<html><body><p>Error fetching URL: {e}</p></body></html>" text = get_text(html_content) print(text)
inscriptis --version
Debug
Known footguns
breakingThe `XmlAnnotationProcessor` (introduced in 2.6.0) now requires a mandatory root element. The generated XML will contain a `<content>` root element by default. If you were using this processor directly, your XML output structure will change.
deprecatedSupport for Python 3.9 has been removed as of version 2.7.0. Python 3.8 support was deprecated in 2.5.1 and subsequently removed.
gotchaWhen processing very complex HTML pages, `inscriptis` (which uses `lxml` internally) may exhibit increased memory consumption due to `lxml`'s tendency to reuse memory rather than releasing it back to the operating system.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
14 hits · last 30 days
gptbot
4
ahrefsbot
4
amazonbot
4
script
1
googlebot
1
Resources