Tesseract pybind11 bindings
Project description
tessbind
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 testto create the venv and build vendored libraries.uv run pytest -m "not slow"to run the test suite.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tessbind-1.1.0.tar.gz.
File metadata
- Download URL: tessbind-1.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7694ae2295230d56f47ff0850cb0953a31b1cf7b134c121c030e157fe35d2783
|
|
| MD5 |
eec7acb7ea8a8150843a50abc4b6cca7
|
|
| BLAKE2b-256 |
46e069fe1bc6ec0b23bf9e08eec34383ad8513f4fef46f11d1d069e4b1b81c84
|
Provenance
The following attestation bundles were made for tessbind-1.1.0.tar.gz:
Publisher:
cd.yaml on elohmeier/tessbind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tessbind-1.1.0.tar.gz -
Subject digest:
7694ae2295230d56f47ff0850cb0953a31b1cf7b134c121c030e157fe35d2783 - Sigstore transparency entry: 982054106
- Sigstore integration time:
-
Permalink:
elohmeier/tessbind@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/elohmeier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file tessbind-1.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: tessbind-1.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 3.4 MB
- Tags: CPython 3.14, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e278692950b02ea2593580cd9659b20d028be3e2913795d6fa8ea4c67289e1f3
|
|
| MD5 |
9d464ecc57656251094bd37d2828af84
|
|
| BLAKE2b-256 |
04e9d9948526ae2de03006b4b058e70a848c9e0563a55238aa261bb039dacc44
|
Provenance
The following attestation bundles were made for tessbind-1.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
cd.yaml on elohmeier/tessbind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tessbind-1.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
e278692950b02ea2593580cd9659b20d028be3e2913795d6fa8ea4c67289e1f3 - Sigstore transparency entry: 982054482
- Sigstore integration time:
-
Permalink:
elohmeier/tessbind@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/elohmeier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file tessbind-1.1.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: tessbind-1.1.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.14, manylinux: glibc 2.27+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4fbe21e1355e20bbac3a509a3ec582b027e82e88746ec57481900453a2d9d0a
|
|
| MD5 |
1893802efa2c0a668c78bd5688a366e8
|
|
| BLAKE2b-256 |
ad6b5c8ed16932ba23afa03e873b1b8b127edd08b67675201db30d68075b12f3
|
Provenance
The following attestation bundles were made for tessbind-1.1.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:
Publisher:
cd.yaml on elohmeier/tessbind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tessbind-1.1.0-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl -
Subject digest:
c4fbe21e1355e20bbac3a509a3ec582b027e82e88746ec57481900453a2d9d0a - Sigstore transparency entry: 982054435
- Sigstore integration time:
-
Permalink:
elohmeier/tessbind@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/elohmeier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file tessbind-1.1.0-cp314-cp314-macosx_11_0_arm64.whl.
File metadata
- Download URL: tessbind-1.1.0-cp314-cp314-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.14, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1c732bf66e76e59d6e2561cc5f3397e0ee355e1cb00399566a34f655b160d4a
|
|
| MD5 |
8192a5ef9df8a2b05ffb0f28c4769b6b
|
|
| BLAKE2b-256 |
4ba8052c4bcdc51e964f5ca1332d95733ef8836d1477f0eff01aa945f26c667d
|
Provenance
The following attestation bundles were made for tessbind-1.1.0-cp314-cp314-macosx_11_0_arm64.whl:
Publisher:
cd.yaml on elohmeier/tessbind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tessbind-1.1.0-cp314-cp314-macosx_11_0_arm64.whl -
Subject digest:
f1c732bf66e76e59d6e2561cc5f3397e0ee355e1cb00399566a34f655b160d4a - Sigstore transparency entry: 982054508
- Sigstore integration time:
-
Permalink:
elohmeier/tessbind@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/elohmeier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file tessbind-1.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: tessbind-1.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 3.4 MB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53dfc02e6dd8d016191f88f1cc15517b587a9e9007af6588ec706fff20f1dacd
|
|
| MD5 |
3580e9ffee1146ade1133f0e3812e70c
|
|
| BLAKE2b-256 |
60bf441ba17df55c237ac5ba75cbbbe58d6900e80d1fc73ba9d368cc92916995
|
Provenance
The following attestation bundles were made for tessbind-1.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
cd.yaml on elohmeier/tessbind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tessbind-1.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
53dfc02e6dd8d016191f88f1cc15517b587a9e9007af6588ec706fff20f1dacd - Sigstore transparency entry: 982054238
- Sigstore integration time:
-
Permalink:
elohmeier/tessbind@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/elohmeier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file tessbind-1.1.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: tessbind-1.1.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.13, manylinux: glibc 2.27+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c39ac9dc8934b88d2765b5b327cf5ada4e4f251c5d372b2afad18ed4a136c6c
|
|
| MD5 |
b98b36b56c5e64a87dc420553233e062
|
|
| BLAKE2b-256 |
26322bc25f96547be93997f83ea4256bf92d9c62716c8af6df6235aa856e69c4
|
Provenance
The following attestation bundles were made for tessbind-1.1.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:
Publisher:
cd.yaml on elohmeier/tessbind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tessbind-1.1.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl -
Subject digest:
9c39ac9dc8934b88d2765b5b327cf5ada4e4f251c5d372b2afad18ed4a136c6c - Sigstore transparency entry: 982054154
- Sigstore integration time:
-
Permalink:
elohmeier/tessbind@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/elohmeier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file tessbind-1.1.0-cp313-cp313-macosx_11_0_arm64.whl.
File metadata
- Download URL: tessbind-1.1.0-cp313-cp313-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.13, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b41a1b24798bad81cd71bd9635d75828a16faf1b65f9c4747149496d8776d465
|
|
| MD5 |
5dd1d062d8c8e74b67ce0d96809ee90d
|
|
| BLAKE2b-256 |
ae14c7d56c8ba5045fdb2d313ea1e85a80b6de23f73946beef84d9618a1d9940
|
Provenance
The following attestation bundles were made for tessbind-1.1.0-cp313-cp313-macosx_11_0_arm64.whl:
Publisher:
cd.yaml on elohmeier/tessbind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tessbind-1.1.0-cp313-cp313-macosx_11_0_arm64.whl -
Subject digest:
b41a1b24798bad81cd71bd9635d75828a16faf1b65f9c4747149496d8776d465 - Sigstore transparency entry: 982054286
- Sigstore integration time:
-
Permalink:
elohmeier/tessbind@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/elohmeier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file tessbind-1.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: tessbind-1.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 3.4 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbce8ea190725c7e4cc93d59d0b99cebca30c7b5ed5ff60557f005503ffcc123
|
|
| MD5 |
8aa1b6ebd7d04bf762840593169df204
|
|
| BLAKE2b-256 |
3c4a51d2366988fc4920bb5fea088511c4e3e85e2ebf6a4d5cab1bcf3935732b
|
Provenance
The following attestation bundles were made for tessbind-1.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:
Publisher:
cd.yaml on elohmeier/tessbind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tessbind-1.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl -
Subject digest:
bbce8ea190725c7e4cc93d59d0b99cebca30c7b5ed5ff60557f005503ffcc123 - Sigstore transparency entry: 982054333
- Sigstore integration time:
-
Permalink:
elohmeier/tessbind@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/elohmeier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file tessbind-1.1.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.
File metadata
- Download URL: tessbind-1.1.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6771db5ba1ec54e1174544c0c762b8862de643e136ad8466a3b2a8672d186220
|
|
| MD5 |
d512425f451171cca0e88c9e0d7fdb62
|
|
| BLAKE2b-256 |
a1db913884c84e0012dcf73ce0ccf90189a4ced02b1764e66cd719515c11f896
|
Provenance
The following attestation bundles were made for tessbind-1.1.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:
Publisher:
cd.yaml on elohmeier/tessbind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tessbind-1.1.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl -
Subject digest:
6771db5ba1ec54e1174544c0c762b8862de643e136ad8466a3b2a8672d186220 - Sigstore transparency entry: 982054197
- Sigstore integration time:
-
Permalink:
elohmeier/tessbind@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/elohmeier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file tessbind-1.1.0-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: tessbind-1.1.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5a3cac5c86690faa6c5241bed599d97398a3ced6b25f32a2b3065a26360079d
|
|
| MD5 |
7e16c11a2026f63c57dcddd3d6088a91
|
|
| BLAKE2b-256 |
9f2f8d75461ff3e6524a0d06fa27f3021f27e2c4a9657f984422fead9de0bfc3
|
Provenance
The following attestation bundles were made for tessbind-1.1.0-cp312-cp312-macosx_11_0_arm64.whl:
Publisher:
cd.yaml on elohmeier/tessbind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tessbind-1.1.0-cp312-cp312-macosx_11_0_arm64.whl -
Subject digest:
c5a3cac5c86690faa6c5241bed599d97398a3ced6b25f32a2b3065a26360079d - Sigstore transparency entry: 982054378
- Sigstore integration time:
-
Permalink:
elohmeier/tessbind@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/elohmeier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yaml@864e6c3cc68f2f8b135d3fd50a228f045720c725 -
Trigger Event:
workflow_run
-
Statement type: