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
Built Distribution
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 z_parser_sdk-1.1.0.tar.gz.
File metadata
- Download URL: z_parser_sdk-1.1.0.tar.gz
- Upload date:
- Size: 79.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73e823e893435526997c1fc8a37c2f81b33139f574511252207bf821c7a2b539
|
|
| MD5 |
d14fa7c4cfc42c97b9415c67a2003776
|
|
| BLAKE2b-256 |
f98aed08363d209705038353a86e030ade88966780eb37e5713bf18e411205f6
|
File details
Details for the file z_parser_sdk-1.1.0-py3-none-any.whl.
File metadata
- Download URL: z_parser_sdk-1.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbc751cd41589cf8f3ba100950651467e2a81ef5a4290c01e4fb0b358b1e9d56
|
|
| MD5 |
a09a125964089245a4c9aeb6c0760e71
|
|
| BLAKE2b-256 |
a9c4608c361470dd6d587abdef10ea521df2a24b8b57d4789efc94cf4e960e90
|