Skip to main content

iscc-tika Python Bindings

This project provides Python bindings for the iscc-tika library, allowing you to use iscc-tika functionality in your Python applications.

Installation

pip install iscc-tika

Usage

Extracting a file to string:

from iscc_tika 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 iscc_tika 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 iscc_tika 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)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iscc_tika-0.6.0.tar.gz (216.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

iscc_tika-0.6.0-cp310-abi3-win_amd64.whl (40.8 MB view details)

Uploaded CPython 3.10+Windows x86-64

iscc_tika-0.6.0-cp310-abi3-manylinux_2_28_x86_64.whl (42.0 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ x86-64

iscc_tika-0.6.0-cp310-abi3-manylinux_2_28_aarch64.whl (41.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ ARM64

iscc_tika-0.6.0-cp310-abi3-macosx_11_0_arm64.whl (48.9 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

File details

Details for the file iscc_tika-0.6.0.tar.gz.

File metadata

  • Download URL: iscc_tika-0.6.0.tar.gz
  • Upload date:
  • Size: 216.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for iscc_tika-0.6.0.tar.gz
Algorithm Hash digest
SHA256 9880aa1fd5acad76c2164e289acb73bf528e5e9d286b5d5fdb13863bd54bb236
MD5 7041ca13015e4cfaa0927d1436c7f822
BLAKE2b-256 4d290b1df68addba9b0a3d3739842a47117004c93c099304bfc2077b99766267

See more details on using hashes here.

File details

Details for the file iscc_tika-0.6.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: iscc_tika-0.6.0-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 40.8 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for iscc_tika-0.6.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 df04c9b0803a71605ac4b8c326ec9f0dc0cf4c6590bfdd915285c3c8d30d5974
MD5 dbeb19b99b12f64972d777645a7f72aa
BLAKE2b-256 332979d2190f75703c88d11c48cb5209a0d16eb15212c4c81964f28625db4338

See more details on using hashes here.

File details

Details for the file iscc_tika-0.6.0-cp310-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for iscc_tika-0.6.0-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 942aeec48ae989745eb89587b871c3841b4de4ce0ce94b31fd023f0b34ee9ac6
MD5 8bcd22b147d436b0c7430b8bd92e0e58
BLAKE2b-256 f260a083135e1014505b1a7d79747ee126cfebe625d41717f71921075108e09a

See more details on using hashes here.

File details

Details for the file iscc_tika-0.6.0-cp310-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for iscc_tika-0.6.0-cp310-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a0a23f46269aeabe137d2730b15a29b0a170ebaef32235debadb6983e3f937e8
MD5 8659e81b17f4bd0a11b7c44fc1cae485
BLAKE2b-256 3c2b1f397de45c8a746622d04308f125cbf11b4c9e83555cc791ca53a24f0b29

See more details on using hashes here.

File details

Details for the file iscc_tika-0.6.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for iscc_tika-0.6.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6bd2a65f85b8fe4250c232b26b6f0c7f2340b938711b0e39d365d4b5ee8b7400
MD5 45e4334ec9408b13381e14974f293784
BLAKE2b-256 a48c6178481104a6afb67260b84188f4839070c69ffdb44ea292cd30d67a0272

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page