
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
ocrbridge-ocrmac
Advanced tools
ocrbridge-ocrmac is an OCR Bridge engine backed by Apple's Vision framework via ocrmac.
This package plugs into OCR Bridge through Python entry points and provides HOCR output for images and PDFs on macOS.
Entry point registration (from pyproject.toml):
[project.entry-points."ocrbridge.engines"]
ocrmac = "ocrbridge.engines.ocrmac:OcrmacEngine"
Darwin)fast, balanced, accurate)livetextThis package will not run on Linux or Windows.
pip install ocrbridge-ocrmac
Compatibility quick check:
>=3.10>=10.15 (>=14.0 for livetext)ocrbridge-core>=3.1.0, ocrmac>=0.2.2The engine is discovered automatically by OCR Bridge, or you can import and use it directly.
Stable imports from this package:
OcrmacEngineOcrmacParamsRecognitionLevellanguages (list[str] | None): IETF BCP 47 codes (for example "en-US", "zh-Hans")recognition_level (RecognitionLevel): fast, balanced, accurate, livetextDefaults:
languages=None (auto-detect)recognition_level=RecognitionLevel.BALANCEDfrom pathlib import Path
from ocrbridge.engines.ocrmac import OcrmacEngine, OcrmacParams, RecognitionLevel
engine = OcrmacEngine()
# Process with defaults
hocr = engine.process(Path("document.pdf"))
# Process with custom parameters
params = OcrmacParams(
languages=["en-US", "fr-FR"],
recognition_level=RecognitionLevel.ACCURATE,
)
hocr = engine.process(Path("document.pdf"), params)
# LiveText (requires macOS 14+)
params_livetext = OcrmacParams(
languages=["en-US"],
recognition_level=RecognitionLevel.LIVETEXT,
)
hocr = engine.process(Path("document.pdf"), params_livetext)
This package exposes one OCR Bridge engine entry point:
ocrbridge.enginesocrmacocrbridge.engines.ocrmac:OcrmacEngineIf the package is installed but not discovered, run:
from importlib.metadata import entry_points
eps = entry_points()
group = "ocrbridge.engines"
if hasattr(eps, "select"):
engines = eps.select(group=group)
else:
engines = eps.get(group, [])
for ep in engines:
print(f"{ep.name} -> {ep.value}")
.jpg.jpeg.png.pdf.tiff.tifThis repository uses uv for Python environments/dependencies and mise for task aliases.
mise run install
mise run lint
mise run format
mise run typecheck
mise run test
mise run check
mise run all
Direct equivalents:
uv sync --extra dev
uv run ruff check src tests
uv run ruff format src tests
uv run pyright
uv run pytest
Use pytest node IDs:
uv run pytest tests/test_models.py::TestOcrmacParams::test_validate_languages
uv run pytest tests/test_engine_unit.py::TestProcessMethod::test_process_routes_to_pdf_handler
Useful filters:
uv run pytest tests/test_engine_integration.py -m integration
uv run pytest -k livetext
mise tasks for lint/format/typecheck/testpython-semantic-releaselivetext fails: verify macOS major version is 14 or newer.See CONTRIBUTING.md for contribution workflow and commit message guidance.
FAQs
ocrmac (Apple Vision) OCR engine for OCR Bridge
We found that ocrbridge-ocrmac demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.