Skip to content

ozaru

Read PDF files from Python with a small, simple API and a Rust core.

PyPI version Python versions CI License: MIT


ozaru gets the text out of a PDF in one line of Python:

import ozaru

text = ozaru.extract_text("report.pdf")
pages = ozaru.page_count("report.pdf")

print(f"Pages: {pages}")
print(f"Title: {text.splitlines()[0]}")

Run it on the sample report and you get:

Pages: 3
Title: Quarterly Report

Why ozaru?

  • One line per task. Pass a path and get the result. There are no objects to manage.
  • Easy to install. Prebuilt wheels mean you don't need Rust or a compiler.
  • No Python dependencies. ozaru installs nothing else into your environment.
  • Built on Rust. The PDF work is done by pdf_oxide.
  • Typed. Type hints are included, so your editor can autocomplete and check your calls.

Install it

pip install ozaru
uv add ozaru

Where to go next