♻️ uniformize with other sdks#448
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to “uniformize” the Python SDK with other Mindee SDKs by adding typed accessors to SimpleField, introducing a polling cancellation mechanism in the V2 client, and strengthening URL input validation against common SSRF vectors.
Changes:
- Added
string_value/number_value/boolean_valueconvenience properties onSimpleField+ unit tests. - Added a
CancellationTokenand optionalcancellation_tokensupport inClient.enqueue_and_get_result. - Replaced the URL scheme check with a more complete
validate_url_for_sourceSSRF-focused validation.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
tests/v2/parsing/test_simple_field.py |
Adds unit coverage for the new typed SimpleField accessors. |
tests/v2/file_operations/test_split_operation_integration.py |
Removes a stray blank line in an integration test. |
mindee/v2/parsing/inference/field/simple_field.py |
Introduces typed getters that validate the stored value’s type. |
mindee/v2/client.py |
Adds optional cancellation token support during polling. |
mindee/mindee_http/response_validation.py |
Adds validate_url_for_source for SSRF-oriented URL validation. |
mindee/mindee_http/cancellation_token.py |
Introduces a small cancellation token class. |
mindee/input/url_input_source.py |
Uses validate_url_for_source instead of a simple https prefix check. |
sebastianMindee
force-pushed
the
uniformize-with-other-sdks
branch
3 times, most recently
from
July 17, 2026 14:15
3a8fd79 to
a54e9dd
Compare
sebastianMindee
force-pushed
the
uniformize-with-other-sdks
branch
from
July 17, 2026 14:34
a54e9dd to
540d1d8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Types of changes