omniocr
Python packge for using OmniOcr: https://omniocr.ai
pip install omniocr
Usage
Get your API key from: https://omniocr.ai/
Then you can start to OCR documents with:
export OMNIOCR_API_KEY=<OMNIOCR_API_KEY>
omniocr examples/resources/sample.pdf \
--model=lightonocr-2-1b \
--format=markdown \
--pages "1-3" > output.md
Alternatively, you can run it programmatically:
from omniocr import OmniOcr
client = OmniOcr()
document = client.process(
"examples/resources/sample.pdf",
model="lightonocr-2-1b",
format="markdown",
pages="1-3"
)
print(document)
Formats
There are two types of formats that omniocr supports:
- markdown conversion -- this is the simplest, the document is just converted to markdown, typically with placeholders for images
- block-based output -- if you need bounding boxes for where the text comes from, you should use a model that supports bounding box outputs
Supported Models
Metadata
Release files for omniocr 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| omniocr-0.1.2.tar.gz | 5.3 kB | Without provenance | Details for omniocr-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| omniocr-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for omniocr-0.1.2-py3-none-any.whl |
Total release size: 11.7 kB
Release files / omniocr-0.1.2.tar.gz
| Download URL | omniocr-0.1.2.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae018c5780675a92c22f7ae1568f4b6922b128a64ba8583d9ead3422fcde2289
|
|
BLAKE2b-256 checksum How to use checksums |
99581016b4b4bda73de09ec71897a4ae4d636033f596665efdaece07b2f3f7b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.10
|
Release files / omniocr-0.1.2-py3-none-any.whl
| Download URL | omniocr-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
59d2e6ab2f437ce9577fa66497d1ea56a35dde6632dc12f1f7b6794ce4266585
|
|
BLAKE2b-256 checksum How to use checksums |
1801ff89810c893ab3cf6deccc0e2584369a48f6f1e3f5d151ec12f7fff254d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.10
|
Security for omniocr 0.1.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.