YOU.PDF: A FastAPI PDF Toolkit — Extract Text, Merge, Split, Inspect
Описание и применение
YOU.PDF — компактный FastAPI‑сервис для работы с PDF: получение метаданных, извлечение текста, объединение и разрезка документов. Он самодостаточен, не хранит файлы и не требует сторонних сервисов.
Задача
PDF tools are either bloated or untrustworthy, forcing users to rely on desktop apps, third‑party services, or custom scripts for common PDF operations.
Результат
The toolkit delivers fast, reliable PDF operations in a single file, with in‑memory streaming responses, strict range validation, and a comprehensive test suite that generates real PDFs.
Рабочий процесс
- 1. Deploy the service via Docker or Render. 2. Send a multipart POST to /info to get metadata. 3. POST to /extract with optional pages to retrieve text. 4. POST to /merge with two or more files to combine. 5. POST to /split with ranges to extract reordered pages. 6. Use the returned PDFs or JSON directly in downstream processes.
Доказательства
Everyone needs PDF surgery sometimes — pull the text out of a report, merge three scanned contracts, extract pages 4–7 for a client.
YOU.PDF takes the middle path a developer actually wants: a small, self-hostable HTTP API for the four operations that cover ~90% of PDF chores.
The test suite generates real PDFs with reportlab and pushes them through the actual HTTP endpoints via FastAPI's TestClient.
Encrypted PDFs are rejected with a clear 400.
- Дата записи: 2026-10-12T22:55:53.581Z