Registry / data / kreuzberg

kreuzberg

JSON →
library4.9.9pypypiunverified

Kreuzberg is a high-performance Python library for document intelligence, enabling extraction of text, metadata, and structured data from PDFs, Office documents, images, and over 88 other formats. It leverages a Rust core for significant speed improvements (10-50x faster) compared to pure Python alternatives. The current version is 4.8.5, with an active release cadence, typically releasing minor updates every few weeks.

pip install kreuzberg
INSTALL
IMPORT
SIG · KREUZBERG
K
kreuzberg
datapythonv4.9.9
Install
4.0s avg
Import
Disk
94MB
Pass rate
6/ 10
Env Coverage6 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.9.9 · 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
glibc
py 3.10
✕ build_error
✓ 2.45s
py 3.11
✕ build_error
✓ 2.55s
py 3.12
✕ build_error
✓ 2.45s
py 3.13
✕ build_error
✓ 2.35s
py 3.9
✓ —
✓ 10.2s
94MB installed
● package 94MB
Code
Verified usage

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

extract
from kreuzberg import extract
from kreuzberg import extract

This quickstart demonstrates how to perform basic text and styled HTML extraction using Kreuzberg's `extract` function with `ExtractionConfig` and `OutputFormat`. It shows how to specify the output format and customize HTML output with `HtmlOutputConfig`.

import os from kreuzberg import extract, ExtractionConfig, OutputFormat, HtmlOutputConfig # Create a dummy file for demonstration with open("example.txt", "w") as f: f.write("This is a test document for Kreuzberg extraction.") # Example 1: Basic text extraction config_text = ExtractionConfig( output_format=OutputFormat.TEXT ) result_text = extract("example.txt", config=config_text) print("--- Text Extraction ---") print(result_text.text) # Example 2: HTML extraction with a specific theme config_html = ExtractionConfig( output_format=OutputFormat.HTML, html_output=HtmlOutputConfig(theme="github") ) result_html = extract("example.txt", config=config_html) print("\n--- HTML Extraction (GitHub theme) ---") print(result_html.html) os.remove("example.txt") # Clean up the dummy file
Debug
Known issues
breakingKreuzberg requires Python 3.10 or newer. Installing or running the library on older Python versions will result in errors.
fix
Upgrade your Python environment to 3.10 or a more recent version (e.g., 3.11, 3.12).
affects: <4.0.0 (previous major versions might have supported older Pythons) and all versions >=4.0.0
gotchaWhen extracting in HTML format, versions 4.8.1 and later introduced default styling. If you were expecting plain, unstyled HTML, your output will now include CSS and semantic classes.
fix
To get unstyled HTML, explicitly set `html_output=HtmlOutputConfig(theme="unstyled")` in your `ExtractionConfig`.
affects: >=4.8.1
gotchaVersions prior to 4.8.2 had a bug where legitimate repeated content (e.g., brand names, headers) in PDFs could be stripped, even if `strip_repeating_text` was not enabled or intended.
fix
Upgrade to `kreuzberg v4.8.2` or newer to resolve the issue with overly aggressive content stripping.
affects: <4.8.2
gotchaUsers on macOS ARM64 systems (e.g., M1/M2/M3 Macs) using `kreuzberg` versions older than `v4.7.3` might experience a `SIGBUS` (Bus error: 10) crash when processing archive files (ZIP, 7Z, TAR, GZIP).
fix
Upgrade `kreuzberg` to `v4.7.3` or a newer version to fix the archive extraction crash.
affects: <4.7.3
Upgrade
Version history
4.9.9latest on PyPI · released Jun 5, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
kreuzberg — pip install kreuzberg · libregistry