Skip to content

feat(extract): add client.extract_file and CLI binary file support - #141

Merged
lenzhq merged 2 commits into
mainfrom
feat/extract-file
Nov 1, 2026
Merged

lenzhq merged 2 commits into
mainfrom
feat/extract-file

Conversation

@lenzhq

@lenzhq lenzhq commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add client.extract_file and async_client.extract_file for POST /api/v1/extract/file (multipart/form-data), accepting Word (.docx), PDF (.pdf), and image (.png, .jpg, .jpeg, .webp) files (path | str | bytes | BinaryIO).
  • Route lenz extract <path> to client.extract_file when <path> is an existing .docx, .pdf, .png, .jpg, .jpeg, or .webp file on disk (catching OSError such as ENAMETOOLONG when literal text ends in a binary extension).
  • Preserve validation_error and unsupported_language error codes and errors[] on /extract/file by registering extract/file in _REVIEW_FAMILY.
  • Sync openapi.json (2026-10-11 canonical schema), README.md, CHANGELOG.md (keeping package version at 3.6.0), and unit tests.
  • External diff reviews: Astra (codex review) + Opus (claude --model opus) completed on 722a7d6; all findings addressed in HEAD.

Post-deploy actions and prod testing

  • Deploy lenzhq/Lenz#1585 (POST /api/v1/extract/file) before tagging/publishing v3.6.0.
  • Smoke test lenz extract sample.pdf --locate and client.extract_file("sample.docx") against https://lenz.io/api/v1/extract/file.

@lenzhq
lenzhq merged commit 1b35926 into main Nov 1, 2026
13 checks passed
@lenzhq
lenzhq deleted the feat/extract-file branch November 1, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant