Repository navigation
PDFCLOUD-6569 Add passwords to image conversions- #52 - #53
Conversation
✅ Deploy Preview for pdfrest-python ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Accept open passwords for PNG, BMP, GIF, JPEG, and TIFF helpers - Serialize passwords through the shared sync and async payload contract - Cover request serialization and empty-password rejection Assisted-by: Codex
- Verify encrypted inputs across PNG, BMP, GIF, JPEG, and TIFF - Exercise correct passwords through synchronous and asynchronous clients - Confirm incorrect passwords return an API error Assisted-by: Codex
- Add a runnable protected-PDF-to-PNG workflow using an open password - Link the example from the inventory and API guide for discoverability Assisted-by: Codex
a776995 to
f5837e0
Compare
datalogics-kam
left a comment
There was a problem hiding this comment.
Review by Codex running the pr-review-auditor skill against f411bae..f5837e0.
Requesting changes for the three inline test-coverage and repository-policy findings: cover wrong passwords for all five formats through both clients, strengthen the new live output assertions, and keep client validation cases in the endpoint test modules. No production correctness bug or CI regression was observed.
Validation completed during the audit: non-live tests passed across Python 3.10-3.14, all five client class-function coverage gates passed, all 12 new live password cases passed, and the protected-PDF example passed. Changed-file formatting/lint and basedpyright passed. Repository-wide lint reports only unrelated untracked notebook errors. The complete live suite was not repeated locally; exact-head hosted CI passed it. The PR head is unchanged, and git diff --check passed again before submission.
Please also refresh the PR description: its first-line Jira key disagrees with the branch/title, and the prerequisite/stack and blocked-live-validation text is stale relative to the current diff and passing CI.
- Verify wrong passwords for every image format through both clients - Assert live output count, prefix, URL, and warning state - Keep empty-password client checks in each endpoint test module Assisted-by: Codex
datalogics-kam
left a comment
There was a problem hiding this comment.
Reviewed interface by hand. Codex reviewed, and ran the PR Review Auditor.
PDFCLOUD-6569
Why this change
The pdfRest image conversion routes accept an open password for encrypted PDFs, but the Python SDK did not expose that option. Users therefore could not convert password-protected PDFs through the typed BMP, GIF, JPEG, PNG, or TIFF helpers.
What changed (high level)
The shared graphic payload now accepts an optional non-empty password, and all five synchronous and asynchronous image helpers pass it through to the service. Keeping the field on the shared payload gives every image format the same validation and serialization behavior.
The change also adds endpoint-owned unit coverage, live success and wrong-password coverage for every image format through both clients, documentation, and an end-to-end example that protects a PDF and converts it to PNG. Live success assertions verify the requested prefix, deterministic output count, MIME type, suffix, size, URL, warning state, and input ID.
Behavior changes
Callers can now pass
password=toconvert_to_bmp,convert_to_gif,convert_to_jpeg,convert_to_png, andconvert_to_tiff, including their asynchronous equivalents. Omitting the argument preserves existing behavior; an empty password is rejected locally before transport execution.This is a backward-compatible public API addition.
Validation
uvx nox -s tests -- -m 'not live'— Python 3.10–3.14 each passed 2,923 tests with 10 expected skips and 95% total coverageuv run ruff format .uv run ruff check .Risks and follow-ups
The new argument is optional and uses the existing graphic payload and transport paths, so existing unencrypted conversion calls are unaffected. Route-specific wrong-password behavior is now covered live for every supported output format to catch service drift.