Skip to main content

z-parser

Python SDK for the z-parser document-extraction service: bytes in, RAG-ready Markdown out. Scanned PDFs (SOTA OCR + vision escalation), Office, spreadsheets, images, charts, manuscripts, EPUB, e-mail, audio/video transcription — one client.

pip install z-parser
from z_parser import ZParser

zp = ZParser("http://localhost:4056")     # or export Z_PARSER_URL
doc = zp.parse("rapport.pdf")             # path, or bytes + filename=
print(doc.parser, doc.num_chars)          # e.g. "mistral-ocr+figures(2)" 48213
doc.save("rapport.md")

pdf = zp.render_pdf("deck.pptx")          # Office → viewable PDF (page N = slide N)
figs = zp.images("catalogue.pdf", mode="artwork")   # per-figure crops + captions

CLI:

z-parser contract.pdf -o contract.md

Pick your provider from the client — Mistral, Ollama (100 % local), vLLM, Hugging Face or any OpenAI-compatible vision endpoint, per client or per call:

zp = ZParser(vision_provider="openai",
             vision_base_url="http://host.docker.internal:11434/v1",  # Ollama, seen FROM the server
             vision_model="llama3.2-vision",
             doc_vision=True)      # PDFs through local vision too → fully offline

One runnable example per provider ships in examples/ (with sample files). Safety contract: a caller-chosen vision_base_url never receives the server's own API keys. With no provider params, the server's configuration applies.

Errors are explicit: ZParserError carries the service's status (unsupported / error) and message. Timeouts default to 15 minutes — large OCR jobs are slow by nature; pass timeout= to change.

The service itself (Docker, one container) and its ground-truth benchmark live in the main repository.

Download files

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

Source Distribution

z_parser_sdk-0.1.0.tar.gz (33.3 kB view details)

Uploaded Source

Built Distribution

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

z_parser_sdk-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file z_parser_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: z_parser_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 33.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.12

File hashes

Hashes for z_parser_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6c339414dc857fbcca620889e4c1381a56a6e28ed2c8907ec1d86e2230daa34c
MD5 55ad0ebb8a0bfaadacb6409caacb6995
BLAKE2b-256 84d1678a7b640aa61ae766a2fb728834f06e19887a6bb838d6bc4d15a4bd2fb1

See more details on using hashes here.

File details

Details for the file z_parser_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: z_parser_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.12

File hashes

Hashes for z_parser_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6c8ae37807d317dae1dd113ea38f1a9de6499fa5b287f0be3b09406c7f72b1a
MD5 0b6786ea07efe5ab4e040b9e2bcb185e
BLAKE2b-256 740ebad6f8e6a4482fa9b795cc974a77d44e0c4c661d7747dec37bcf31655232

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