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-sdk       # the import stays `z_parser`, the CLI stays `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-1.0.0.tar.gz (36.8 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-1.0.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: z_parser_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 36.8 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-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a7ae8bf91cdb93a3051b35f2d4d7a355a92b1aec7a7f73444a314294de68d561
MD5 762fcb0d49a78eaf215d1584affc1bc7
BLAKE2b-256 42e1529d30bec26789f701d332f7c7210ffb248bd1e65c84ba78f76df8491c17

See more details on using hashes here.

File details

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

File metadata

  • Download URL: z_parser_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 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-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d68a32749969a46f7ee6c5dd01256ce68f2a59d8c8209d616f1cf8942b24987e
MD5 1c6c5cdd085eafcecaaa34e727f83631
BLAKE2b-256 8f3941224bed057f2178729e6f91431103d91ae0df75de440d4fc9ca223ed371

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