Skip to content

SDK-2530-python-create-helper-methods-for-the-idv-sdk - #468

Merged
mehmet-yoti merged 1 commit into
developmentfrom
SDK-2530-python-create-helper-methods-for-the-idv-sdk
Nov 18, 2026
Merged

mehmet-yoti merged 1 commit into
developmentfrom
SDK-2530-python-create-helper-methods-for-the-idv-sdk

Conversation

@mehmet-yoti

Copy link
Copy Markdown
Contributor

Summary

Adds helper methods so a Relying Business can look up which Resources (ID documents, supplementary documents, liveness captures, share codes) were used by a given Check, without manually cross-referencing CheckResponse.resources_used against GetSessionResult.resources themselves.

@sonarqubecloud

sonarqubecloud Bot commented Sep 2, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The new helper methods are small, consistent with existing parsing behavior, and are covered by focused unit tests for expected and edge cases.

Pull request overview

Adds convenience APIs to the Doc Scan session retrieval layer to make it easy to obtain the specific resources referenced by a particular check, avoiding manual cross-referencing of resources_used against the session’s resources payload.

Changes:

  • Add ResourceContainer.filter_for_check(check_response) to return a new ResourceContainer containing only resources whose IDs are referenced by a check’s resources_used.
  • Add GetSessionResult.get_resources_for_check(check_id) to locate a check by ID and return the filtered resources for that check.
  • Add/extend unit tests covering both helpers, including “no matches”, “no resources_used”, and “unknown check id” cases.
File summaries
File Description
yoti_python_sdk/doc_scan/session/retrieve/resource_container.py Adds filter_for_check() helper and internal ID-based filtering.
yoti_python_sdk/doc_scan/session/retrieve/get_session_result.py Adds get_resources_for_check() helper to fetch resources by check ID.
yoti_python_sdk/tests/doc_scan/session/retrieve/test_resource_container.py Adds unit tests for ResourceContainer.filter_for_check().
yoti_python_sdk/tests/doc_scan/session/retrieve/test_get_session_result.py Adds unit tests for GetSessionResult.get_resources_for_check(), including error handling.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@nikhilPank
nikhilPank self-requested a review September 7, 2026 17:03

@nikhilPank nikhilPank left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mehmet-yoti
mehmet-yoti merged commit d190c53 into development Nov 18, 2026
14 checks passed
mehmet-yoti added a commit that referenced this pull request Nov 18, 2026
- resolve conflicts with #466/#468/#471 (keep company_profile, get_resources_for_check, session PDF)
- revert formatting-only changes (protobuf, README, setup.py, other SDK files) to development
- remove unused variable in test_session_spec (flake8 F841)
@mehmet-yoti mehmet-yoti mentioned this pull request Nov 18, 2026
mehmet-yoti added a commit that referenced this pull request Nov 25, 2026
* SDK-2488: Python - Support dark mode in IDV SDK - python (#466)

* Add dark_mode and primary_colour_dark_mode to SdkConfig (SDK-2488)

Extends SdkConfig and SdkConfigBuilder with two new optional fields:
- dark_mode (with_dark_mode, with_dark_mode_on/off/auto convenience methods)
- primary_colour_dark_mode (with_primary_colour_dark_mode)

Both fields are omitted from the JSON payload when not set (None).
* feat(SDK-2488): Python - Support dark mode in IDV SDK [python]
* SDK-2751: Add  to Python SDK IDV Create Session (#470)
* SDK-2530-python-create-helper-methods-for-the-idv-sdk (#468)
* SDK-2773-python-support-central-auth-tokens (#467)
* SDK-2773-python-support-central-auth-tokens
* fix(SDK-2773): add jti claim to auth JWT and address review comments
- Add jti (UUID v4) claim to the client assertion JWT, with an optional
  with_jwt_id_supplier() builder override (parity with PHP/Java)
- Add a configurable timeout to the auth token request (default 30s)
- Don't append a trailing '?' to URLs when there are no query params
- Abstract AuthStrategy methods raise NotImplementedError
- Fix 'compatibility' typo and update DocScanClient docstring

* Merge pull request #471 from getyoti/websdk-auto/SDK-2869-python-support-fetching-session-pdf-in-idv
SDK-2869: Python - Support fetching session PDF in IDV - python
* Sdk 2802 python remove the api for aml check in connect (#469)
* SDK-2802-python-remove-the-api-for-aml-check-in-connect
* ci: pin runners to ubuntu-24.04 so Python 3.9 is still available
ubuntu-latest moved to Ubuntu 26.04, which has no Python 3.9 build in
actions/python-versions. The SDK still supports 3.9 (python_requires>=3.9).
* feat(SDK-2827): Python - Support company_profile for IDV [python] (#472)
* Bump version to 2.15.0
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.

3 participants