Skip to content

Commit ec391f8

Browse files
feat: UTC-661: Agreement V2 Backfill API (#785)
Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 5507881 commit ec391f8

15 files changed

+1247
-219
lines changed

poetry.lock

Lines changed: 235 additions & 219 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

reference.md

Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34169,6 +34169,182 @@ client.projects.stats.finished_tasks(
3416934169
</dl>
3417034170

3417134171

34172+
</dd>
34173+
</dl>
34174+
</details>
34175+
34176+
<details><summary><code>client.projects.stats.<a href="src/label_studio_sdk/projects/stats/client.py">label_distribution_counts</a>(...) -&gt; AsyncHttpResponse[LabelDistributionCountsResponse]</code></summary>
34177+
<dl>
34178+
<dd>
34179+
34180+
#### 📝 Description
34181+
34182+
<dl>
34183+
<dd>
34184+
34185+
<dl>
34186+
<dd>
34187+
34188+
<Card href="https://humansignal.com/goenterprise">
34189+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
34190+
<p style="margin-top: 10px; font-size: 14px;">
34191+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
34192+
</p>
34193+
</Card>
34194+
Returns counts and percentages for requested label choices, from both annotations and predictions. Supports either pagination (`limit`, `offset`) or targeted fetches via explicit `choice_keys`.
34195+
</dd>
34196+
</dl>
34197+
</dd>
34198+
</dl>
34199+
34200+
#### 🔌 Usage
34201+
34202+
<dl>
34203+
<dd>
34204+
34205+
<dl>
34206+
<dd>
34207+
34208+
```python
34209+
from label_studio_sdk import LabelStudio
34210+
34211+
client = LabelStudio(
34212+
api_key="YOUR_API_KEY",
34213+
)
34214+
client.projects.stats.label_distribution_counts(
34215+
id=1,
34216+
)
34217+
34218+
```
34219+
</dd>
34220+
</dl>
34221+
</dd>
34222+
</dl>
34223+
34224+
#### ⚙️ Parameters
34225+
34226+
<dl>
34227+
<dd>
34228+
34229+
<dl>
34230+
<dd>
34231+
34232+
**id:** `int`
34233+
34234+
</dd>
34235+
</dl>
34236+
34237+
<dl>
34238+
<dd>
34239+
34240+
**choice_keys:** `typing.Optional[str]` — Explicit choice keys to fetch, joined by "___PIPE___" (for example: "label___SEP___pos___PIPE___quality___SEP___4"). When provided, pagination params are ignored.
34241+
34242+
</dd>
34243+
</dl>
34244+
34245+
<dl>
34246+
<dd>
34247+
34248+
**limit:** `typing.Optional[int]` — Maximum number of choice keys to return for pagination. Ignored when `choice_keys` is provided.
34249+
34250+
</dd>
34251+
</dl>
34252+
34253+
<dl>
34254+
<dd>
34255+
34256+
**offset:** `typing.Optional[int]` — Zero-based offset into the structure `choice_keys` list. Used only when `choice_keys` is not provided.
34257+
34258+
</dd>
34259+
</dl>
34260+
34261+
<dl>
34262+
<dd>
34263+
34264+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
34265+
34266+
</dd>
34267+
</dl>
34268+
</dd>
34269+
</dl>
34270+
34271+
34272+
</dd>
34273+
</dl>
34274+
</details>
34275+
34276+
<details><summary><code>client.projects.stats.<a href="src/label_studio_sdk/projects/stats/client.py">label_distribution_structure</a>(...) -&gt; AsyncHttpResponse[LabelDistributionStructureResponse]</code></summary>
34277+
<dl>
34278+
<dd>
34279+
34280+
#### 📝 Description
34281+
34282+
<dl>
34283+
<dd>
34284+
34285+
<dl>
34286+
<dd>
34287+
34288+
<Card href="https://humansignal.com/goenterprise">
34289+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
34290+
<p style="margin-top: 10px; font-size: 14px;">
34291+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
34292+
</p>
34293+
</Card>
34294+
Returns dimensions and flattened `choice_keys` for a project. Use this response to drive paginated or targeted calls to the label distribution counts endpoint.
34295+
</dd>
34296+
</dl>
34297+
</dd>
34298+
</dl>
34299+
34300+
#### 🔌 Usage
34301+
34302+
<dl>
34303+
<dd>
34304+
34305+
<dl>
34306+
<dd>
34307+
34308+
```python
34309+
from label_studio_sdk import LabelStudio
34310+
34311+
client = LabelStudio(
34312+
api_key="YOUR_API_KEY",
34313+
)
34314+
client.projects.stats.label_distribution_structure(
34315+
id=1,
34316+
)
34317+
34318+
```
34319+
</dd>
34320+
</dl>
34321+
</dd>
34322+
</dl>
34323+
34324+
#### ⚙️ Parameters
34325+
34326+
<dl>
34327+
<dd>
34328+
34329+
<dl>
34330+
<dd>
34331+
34332+
**id:** `int`
34333+
34334+
</dd>
34335+
</dl>
34336+
34337+
<dl>
34338+
<dd>
34339+
34340+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
34341+
34342+
</dd>
34343+
</dl>
34344+
</dd>
34345+
</dl>
34346+
34347+
3417234348
</dd>
3417334349
</dl>
3417434350
</details>
@@ -38351,6 +38527,14 @@ client.sso.saml.update(
3835138527
<dl>
3835238528
<dd>
3835338529

38530+
**idp_provider:** `typing.Optional[str]` — Identity Provider preset key (e.g. okta, azure, google, custom)
38531+
38532+
</dd>
38533+
</dl>
38534+
38535+
<dl>
38536+
<dd>
38537+
3835438538
**mapping_email:** `typing.Optional[str]` — Mapping attributes: user email from SAML request
3835538539

3835638540
</dd>
@@ -38431,6 +38615,72 @@ client.sso.saml.update(
3843138615
</dl>
3843238616

3843338617

38618+
</dd>
38619+
</dl>
38620+
</details>
38621+
38622+
<details><summary><code>client.sso.saml.<a href="src/label_studio_sdk/sso/saml/client.py">reset</a>() -&gt; AsyncHttpResponse[None]</code></summary>
38623+
<dl>
38624+
<dd>
38625+
38626+
#### 📝 Description
38627+
38628+
<dl>
38629+
<dd>
38630+
38631+
<dl>
38632+
<dd>
38633+
38634+
<Card href="https://humansignal.com/goenterprise">
38635+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
38636+
<p style="margin-top: 10px; font-size: 14px;">
38637+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
38638+
</p>
38639+
</Card>
38640+
Reset SAML2 settings for the currently active organization. This clears all configured fields (domain, metadata, attribute mappings, group mappings) back to their defaults without deleting the underlying settings record.
38641+
</dd>
38642+
</dl>
38643+
</dd>
38644+
</dl>
38645+
38646+
#### 🔌 Usage
38647+
38648+
<dl>
38649+
<dd>
38650+
38651+
<dl>
38652+
<dd>
38653+
38654+
```python
38655+
from label_studio_sdk import LabelStudio
38656+
38657+
client = LabelStudio(
38658+
api_key="YOUR_API_KEY",
38659+
)
38660+
client.sso.saml.reset()
38661+
38662+
```
38663+
</dd>
38664+
</dl>
38665+
</dd>
38666+
</dl>
38667+
38668+
#### ⚙️ Parameters
38669+
38670+
<dl>
38671+
<dd>
38672+
38673+
<dl>
38674+
<dd>
38675+
38676+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
38677+
38678+
</dd>
38679+
</dl>
38680+
</dd>
38681+
</dl>
38682+
38683+
3843438684
</dd>
3843538685
</dl>
3843638686
</details>

src/label_studio_sdk/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@
6868
Hotkeys,
6969
ImportApiRequest,
7070
InferenceRunCostEstimate,
71+
LabelDistributionCountsResponse,
72+
LabelDistributionCountsRow,
73+
LabelDistributionCountsTotals,
74+
LabelDistributionStructureDimension,
75+
LabelDistributionStructureResponse,
7176
LabelStreamTaskDistributionEnum,
7277
LastActionEnum,
7378
LocalFilesExportStorage,
@@ -447,6 +452,11 @@
447452
"InfoWebhooksResponseTasksCreated": ".webhooks",
448453
"InfoWebhooksResponseTasksDeleted": ".webhooks",
449454
"InternalServerError": ".errors",
455+
"LabelDistributionCountsResponse": ".types",
456+
"LabelDistributionCountsRow": ".types",
457+
"LabelDistributionCountsTotals": ".types",
458+
"LabelDistributionStructureDimension": ".types",
459+
"LabelDistributionStructureResponse": ".types",
450460
"LabelStreamTaskDistributionEnum": ".types",
451461
"LabelStudio": ".client",
452462
"LabelStudioEnvironment": ".environment",
@@ -797,6 +807,11 @@ def __dir__():
797807
"InfoWebhooksResponseTasksCreated",
798808
"InfoWebhooksResponseTasksDeleted",
799809
"InternalServerError",
810+
"LabelDistributionCountsResponse",
811+
"LabelDistributionCountsRow",
812+
"LabelDistributionCountsTotals",
813+
"LabelDistributionStructureDimension",
814+
"LabelDistributionStructureResponse",
800815
"LabelStreamTaskDistributionEnum",
801816
"LabelStudio",
802817
"LabelStudioEnvironment",

0 commit comments

Comments
 (0)