Skip to content

feat: add Property binding resource support to SDK#1486

Open
ionmincu wants to merge 1 commit intomainfrom
feat/property-bindings-support
Open

feat: add Property binding resource support to SDK#1486
ionmincu wants to merge 1 commit intomainfrom
feat/property-bindings-support

Conversation

@ionmincu
Copy link
Contributor

@ionmincu ionmincu commented Mar 24, 2026

Summary

  • Adds `sdk.bindings.get_property(key, sub_property?)` — a generic API for reading connector-defined Property binding values from `bindings.json` at runtime
  • Extends `BindingResourceValue` with optional `description` and `propertyName` fields present in Property bindings
  • Merges Property support into `GenericResourceOverwrite` (adds `"property"` to its `resource_type` Literal and an optional `values` field) rather than a separate class
  • Documents `Property` as the 7th resource type in `bindings.spec.md`
  • Replaces the need for user-maintained helpers like the `get_binding_property()` function seen in vertical solutions

Changes

  • `runtime_schema.py` — `BindingResourceValue` gains optional `description` / `propertyName` fields
  • `_bindings.py` — `"property"` added to `GenericResourceOverwrite`; `ResourceOverwriteParser.parse` normalises the `Property` key prefix to lowercase and accepts the real runtime flat-dict format
  • `_bindings_service.py` (new) — `BindingsService.get_property()` reads bindings.json, supports exact and suffix key matching, and honours runtime overwrites via the existing `_resource_overwrites` ContextVar
  • `_uipath.py` — exposes `sdk.bindings` as a `cached_property`
  • `bindings.spec.md` — full documentation for the Property resource type including key format, value structure, metadata fields, and SDK usage examples
  • `test_property_bindings.py` (new) — unit tests covering happy paths, suffix matching, runtime overwrites (Studio-loaded and real runtime payload formats), and error cases

Breaking Changes

None. All changes are additive:

  • ResourceOverwriteParser.parse is strictly more permissive — inputs that previously raised a ValidationError (capital-P key prefix, flat value dict) now succeed. All previously valid inputs produce the same result.
  • Making name and folder_path optional on GenericResourceOverwrite is backwards compatible — existing callers that supply them are unaffected.
  • PropertyResourceOverwrite was introduced and removed in this same PR, so no external code depends on it.

Test plan

  • All existing tests pass (1265 in the main package, full suite green)
  • Unit tests for `BindingsService`: exact key, suffix key, missing key/sub-property, missing file
  • Runtime overwrite path: Studio-loaded overwrites (fully-qualified key), suffix matching against contextvar, real runtime payload (capital-P key, flat dict)
  • `ResourceOverwriteParser` round-trip with all resource types including the new property format

Development Packages

uipath

[project]
dependencies = [
  # Exact version:
  "uipath==2.10.31.dev1014865635",

  # Any version from PR
  "uipath>=2.10.31.dev1014860000,<2.10.31.dev1014870000"
]

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.uv.sources]
uipath = { index = "testpypi" }

[tool.uv]
override-dependencies = [
    "uipath>=2.10.31.dev1014860000,<2.10.31.dev1014870000",
]

uipath-platform

[project]
dependencies = [
  # Exact version:
  "uipath-platform==0.1.9.dev1014865635",

  # Any version from PR
  "uipath-platform>=0.1.9.dev1014860000,<0.1.9.dev1014870000"
]

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.uv.sources]
uipath-platform = { index = "testpypi" }

[tool.uv]
override-dependencies = [
    "uipath-platform>=0.1.9.dev1014860000,<0.1.9.dev1014870000",
]

@github-actions github-actions bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository labels Mar 24, 2026
@ionmincu ionmincu added the build:dev Create a dev build from the pr label Mar 24, 2026
@ionmincu ionmincu force-pushed the feat/property-bindings-support branch 3 times, most recently from ec509b0 to 2ac470e Compare March 25, 2026 15:13
@ionmincu ionmincu force-pushed the feat/property-bindings-support branch 5 times, most recently from ef6d66a to f7d2897 Compare March 26, 2026 09:02
@ionmincu ionmincu force-pushed the feat/property-bindings-support branch from f7d2897 to d1caba0 Compare March 26, 2026 09:07
@ionmincu ionmincu force-pushed the feat/property-bindings-support branch 4 times, most recently from 5631f5d to 48d53de Compare March 26, 2026 10:21
Adds support for the Property resource type in bindings.json, enabling
users to read connector-defined property values (e.g. SharePoint folder
IDs) without writing custom helpers.

- Extend BindingResourceValue with optional description/propertyName fields
- Add "property" to GenericResourceOverwrite (replaces a separate class)
- Add BindingsService with get_property() that reads from bindings.json
  and respects runtime resource overwrites via the existing ContextVar
- Expose sdk.bindings as a cached_property on the UiPath class
- Update bindings.spec.md to document Property as the 7th resource type
- Add unit tests covering file reads, suffix key matching, runtime
  overwrites (including Studio-loaded and real runtime payload formats),
  and error cases

ResourceOverwriteParser.parse now normalises the Property key prefix
to lowercase ("Property" -> "property") and accepts the real runtime
flat-dict format in addition to the explicit {"values": {...}} form.
Both changes are additive — existing valid inputs are unaffected.
@ionmincu ionmincu force-pushed the feat/property-bindings-support branch from 48d53de to 50d184a Compare March 26, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build:dev Create a dev build from the pr test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants