Skip to main content

Tesseract pybind11 bindings

Project description

tessbind

Actions Status

PyPI version PyPI platforms

Python 3.12+ bindings for Tesseract built with pybind11. The package vendors the native dependencies (leptonica, libpng, zlib) so you only need Tesseract's trained data files available at runtime.

Installation

pip install tessbind

Tesseract language data must be discoverable. If it is not installed in a default location (e.g., /usr/share/tesseract-ocr/5/tessdata on Linux or the Homebrew Cellar on macOS), set TESSDATA_PREFIX to the directory that contains the tessdata folder.

Usage

TessbindManager wraps the underlying API in a context manager and exposes the recognized UTF-8 text plus per-word confidences:

from pathlib import Path

from tessbind import PageSegMode, TessbindManager

img_bytes = Path("tests/hello.png").read_bytes()

with TessbindManager(lang="eng", page_seg_mode=PageSegMode.SINGLE_LINE) as tb:
    text, confidences = tb.ocr_image_bytes(img_bytes)

print(text)         # -> Hello, World!
print(confidences)  # list of word-level confidences (0-100)

Use the page_seg_mode setter to change segmentation between calls, or omit it to rely on Tesseract's default.

Development

  • uv sync --extra test to create the venv and build vendored libraries.
  • uv run pytest -m "not slow" to run the test suite.

Project details


Download files

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

Source Distribution

tessbind-0.15.0.tar.gz (18.9 MB view details)

Uploaded Source

Built Distributions

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

tessbind-0.15.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

tessbind-0.15.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (3.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

tessbind-0.15.0-cp314-cp314-macosx_11_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

tessbind-0.15.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

tessbind-0.15.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (3.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

tessbind-0.15.0-cp313-cp313-macosx_11_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

tessbind-0.15.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

tessbind-0.15.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (3.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

tessbind-0.15.0-cp312-cp312-macosx_11_0_arm64.whl (2.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file tessbind-0.15.0.tar.gz.

File metadata

  • Download URL: tessbind-0.15.0.tar.gz
  • Upload date:
  • Size: 18.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tessbind-0.15.0.tar.gz
Algorithm Hash digest
SHA256 a3d49880e2f86a31899024ee5a62a61eb8ad08b8109982993edf0be4cf23bec7
MD5 eacf940d4951cc76dc68212694b90c50
BLAKE2b-256 9f3ccc340f037a7621cc83747558be73b7274976151f6ee9117d3623a9f4c16f

See more details on using hashes here.

Provenance

The following attestation bundles were made for tessbind-0.15.0.tar.gz:

Publisher: cd.yaml on elohmeier/tessbind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tessbind-0.15.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tessbind-0.15.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b95fc4a35531350890408c3ec28f789c4864705ca3222f9a84d9aa27d5649dd4
MD5 c6e215f07b630040ee72506c58a57fe4
BLAKE2b-256 7b99d3c62090da36408eeb38d70ff80f30952fd08e094510fa8665ab82314144

See more details on using hashes here.

Provenance

The following attestation bundles were made for tessbind-0.15.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: cd.yaml on elohmeier/tessbind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tessbind-0.15.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for tessbind-0.15.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0e7ded7e1ba9cef78646a50bcf2b97fada544896c7309e3937bc022cde0d1036
MD5 21fed80e74a679cf3e102c456a2481c4
BLAKE2b-256 6678ac8c8e655c2bb84c54190dbb17535514e4102fa89c884f8a43173e9e0ed0

See more details on using hashes here.

Provenance

The following attestation bundles were made for tessbind-0.15.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: cd.yaml on elohmeier/tessbind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tessbind-0.15.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tessbind-0.15.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 47fb1c9aceac010d4aafb9d012854fb1cab6aa146da627edda1fade26df6f7fb
MD5 b77efa4b0c862c1c010da75de5df4db1
BLAKE2b-256 f7e2ad7f21806cc43a9fb68fc21cbb229d60d7d9e4bc17b87e972245d2af6337

See more details on using hashes here.

Provenance

The following attestation bundles were made for tessbind-0.15.0-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: cd.yaml on elohmeier/tessbind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tessbind-0.15.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tessbind-0.15.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b80f858c3acfefba081271940f135dacd5a72a621dc7897287520f92a8c21958
MD5 359a29188343861d0275f769e58854f8
BLAKE2b-256 00be78637c5de591955d76e59ebbe4642e2bb9f1cbf5ff3da684dae63ec32a6d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tessbind-0.15.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: cd.yaml on elohmeier/tessbind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tessbind-0.15.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for tessbind-0.15.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 035aae6e75037df083cac1b707ad1ed5ed9b444d8b5ef775bfcc7afe59d76955
MD5 7f3fc4a0286bff7569264b47db173a83
BLAKE2b-256 ce8b1135e32a4ab27a8b541d39544b7bfd4890264b7caf6fdbcbceeffaffd5a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for tessbind-0.15.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: cd.yaml on elohmeier/tessbind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tessbind-0.15.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tessbind-0.15.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1dd1a8ea1ef31b78b9e125ab7ebab55fac5ab31b80645da4f30a0491b431b5ca
MD5 415006ee8c0841900e0391ee2ab773f1
BLAKE2b-256 6d0edaa4274d1ef2c85a8dab6a346562f857bac83c99e20c686d106c0e9acafa

See more details on using hashes here.

Provenance

The following attestation bundles were made for tessbind-0.15.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: cd.yaml on elohmeier/tessbind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tessbind-0.15.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tessbind-0.15.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2dd70ce5646cbbc59de6589737796bbb84bb53f05b1e70418624c13069a53dbb
MD5 97ea283ae8cec6d055826021ab73177e
BLAKE2b-256 c91899173dd1f5e77f603aff01ba240466ee2d7729507b422727b15a33fd74a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for tessbind-0.15.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: cd.yaml on elohmeier/tessbind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tessbind-0.15.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for tessbind-0.15.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 93dc7022662a56c5d5293817e2f5fe3c2a654b3bea115ea191215ba67211a1b8
MD5 66cad9bf360f70ccc18cb290c31e609a
BLAKE2b-256 ead8c4738ecba7949393d8801b50afd9be13191069a269e4f87ce3269d002488

See more details on using hashes here.

Provenance

The following attestation bundles were made for tessbind-0.15.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: cd.yaml on elohmeier/tessbind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tessbind-0.15.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tessbind-0.15.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 747a3889b81abe9eb69f7665d04f0c62442a2a4bbcdd165ab4e7a703750fec94
MD5 a7340d5b56e504e2263a2801236eb348
BLAKE2b-256 bf38f7298d4eafc1799f2f0cf5e5c3f20cb6cabd08d3c3e107c9278f9b23704d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tessbind-0.15.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: cd.yaml on elohmeier/tessbind

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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