Skip to main content

Extractous Python Bindings

This project provides Python bindings for the Extractous library, allowing you to use extractous functionality in your Python applications.

Installation

To install the extractous Python bindings, you can use pip:

pip install extractous

Usage

Extracting a file to string:

from extractous import Extractor

# Create a new extractor
extractor = Extractor()
extractor = extractor.set_extract_string_max_length(1000)
# if you need an xml
# extractor = extractor.set_xml_output(True)

# Extract text from a file
result, metadata = extractor.extract_file_to_string("README.md")
print(result)
print(metadata)

Extracting a file(URL / bytearray) to a buffered stream:

from extractous import Extractor

extractor = Extractor()
# for file
reader, metadata = extractor.extract_file("tests/quarkus.pdf")
# for url
# reader, metadata = extractor.extract_url("https://www.google.com")
# for bytearray
# with open("tests/quarkus.pdf", "rb") as file:
#     buffer = bytearray(file.read())
# reader, metadata = extractor.extract_bytes(buffer)

result = ""
buffer = reader.read(4096)
while len(buffer) > 0:
    result += buffer.decode("utf-8")
    buffer = reader.read(4096)

print(result)
print(metadata)

Extracting a file with OCR:

from extractous import Extractor, TesseractOcrConfig

extractor = Extractor().set_ocr_config(TesseractOcrConfig().set_language("deu"))
result, metadata = extractor.extract_file_to_string("../../test_files/documents/eng-ocr.pdf")

print(result)
print(metadata)

Metadata

Release files for extractous 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for extractous 0.3.0
File Size Uploaded
extractous-0.3.0.tar.gz 179.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for extractous 0.3.0
File
extractous-0.3.0-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details
extractous-0.3.0-cp38-abi3-manylinux_2_28_x86_64.whl CPython 3.8 abi3 Linux glibc 2.28+ x86-64 Details
extractous-0.3.0-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details
extractous-0.3.0-cp38-abi3-macosx_10_12_x86_64.whl CPython 3.8 abi3 macOS 10.12+ x86-64 Details

Total release size: 181.2 MB

Release files / extractous-0.3.0.tar.gz

Download URL extractous-0.3.0.tar.gz
Size 179.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ebccc7778137d6be7680660f1e880e8a1898dedca7f64ab4b354a68d22359e84
BLAKE2b-256 checksum
How to use checksums
2a1236c9422feee01461d4db1a915857df21e431ef88ddf9d84e689dd4a984b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 21, 2024.

Transparency log

Release files / extractous-0.3.0-cp38-abi3-win_amd64.whl

Download URL extractous-0.3.0-cp38-abi3-win_amd64.whl
Size 41.1 MB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
d86754320beba736f33c10227a641cce473cfb690c9e2d5ae823c917110c98ab
BLAKE2b-256 checksum
How to use checksums
07a1dd01a3abb4c4af89cf3775735948d76522233ae3550a166b8c2f7c849a52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 21, 2024.

Transparency log

Release files / extractous-0.3.0-cp38-abi3-manylinux_2_28_x86_64.whl

Download URL extractous-0.3.0-cp38-abi3-manylinux_2_28_x86_64.whl
Size 42.3 MB
Tags CPython 3.8 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
01ef136a5901aed0e813f747989bbeaff60e4777cc77b933bef8f10de80b7dfd
BLAKE2b-256 checksum
How to use checksums
6fd91a3838e24f78902ca1a594110a00812134102c5cad13f889141509062481
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 21, 2024.

Transparency log

Release files / extractous-0.3.0-cp38-abi3-macosx_11_0_arm64.whl

Download URL extractous-0.3.0-cp38-abi3-macosx_11_0_arm64.whl
Size 48.5 MB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6e43d9dee26e7cb322b6f9059f3e3565252f444b80d2f4ff2007a002fdd00727
BLAKE2b-256 checksum
How to use checksums
66917debbfabadb88d34687bf93e23d176692bdae7e82c51180b2481710bb709
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 21, 2024.

Transparency log

Release files / extractous-0.3.0-cp38-abi3-macosx_10_12_x86_64.whl

Download URL extractous-0.3.0-cp38-abi3-macosx_10_12_x86_64.whl
Size 49.1 MB
Tags CPython 3.8 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
9f513d8da78b74ab655e659c64e287ddd653009f5af011cef0d2c8467a931e38
BLAKE2b-256 checksum
How to use checksums
985099d6e8982ced454cc7a0e184988b63c65e199587626c45404fc7b6ab9d90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 21, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

5 release files

0.2.0

5 release files

0.1.7

5 release files

0.1.6

5 release files

0.1.5

5 release files

0.1.4

4 release files

0.1.3

4 release files

0.1.1

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page