Skip to content

Commit 42ee23a

Browse files
committed
SDK regeneration
1 parent 8f15fa6 commit 42ee23a

File tree

7 files changed

+5
-203
lines changed

7 files changed

+5
-203
lines changed

.mock/definition/blueprints.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ service:
6565
id: id
6666
audiences:
6767
- public
68-
create_project_from_blueprint:
68+
api_blueprints_create_project_retrieve:
6969
path: /api/blueprints/{share_id}/create-project
7070
method: GET
7171
auth: true
@@ -85,6 +85,6 @@ service:
8585
- path-parameters:
8686
share_id: share_id
8787
audiences:
88-
- public
88+
- internal
8989
source:
9090
openapi: openapi/openapi.yaml

.mock/openapi/openapi.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -923,9 +923,7 @@ paths:
923923
tags:
924924
- Blueprints
925925
x-fern-audiences:
926-
- public
927-
x-fern-sdk-group-name: blueprints
928-
x-fern-sdk-method-name: create_project_from_blueprint
926+
- internal
929927
/api/comments/:
930928
get:
931929
description: List all comments for a specific annotation ID.

poetry.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jsonschema = ">=4.23.0"
4545
lxml = ">=4.2.5"
4646
nltk = "^3.9.1"
4747
numpy = ">=1.26.4,<3.0.0"
48-
opencv-python = "^4.9.0"
48+
opencv-python = "^4.12.0"
4949
pandas = ">=0.24.0"
5050
pydantic = ">= 1.9.2"
5151
pydantic-core = "^2.18.2"

reference.md

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,76 +1853,6 @@ client.blueprints.delete(
18531853
</dl>
18541854

18551855

1856-
</dd>
1857-
</dl>
1858-
</details>
1859-
1860-
<details><summary><code>client.blueprints.<a href="src/label_studio_sdk/blueprints/client.py">create_project_from_blueprint</a>(...)</code></summary>
1861-
<dl>
1862-
<dd>
1863-
1864-
#### 📝 Description
1865-
1866-
<dl>
1867-
<dd>
1868-
1869-
<dl>
1870-
<dd>
1871-
1872-
Create a new project from an existing blueprint. On success, user is redirected to the new project with a 302.
1873-
</dd>
1874-
</dl>
1875-
</dd>
1876-
</dl>
1877-
1878-
#### 🔌 Usage
1879-
1880-
<dl>
1881-
<dd>
1882-
1883-
<dl>
1884-
<dd>
1885-
1886-
```python
1887-
from label_studio_sdk import LabelStudio
1888-
1889-
client = LabelStudio(
1890-
api_key="YOUR_API_KEY",
1891-
)
1892-
client.blueprints.create_project_from_blueprint(
1893-
share_id="share_id",
1894-
)
1895-
1896-
```
1897-
</dd>
1898-
</dl>
1899-
</dd>
1900-
</dl>
1901-
1902-
#### ⚙️ Parameters
1903-
1904-
<dl>
1905-
<dd>
1906-
1907-
<dl>
1908-
<dd>
1909-
1910-
**share_id:** `str` — Blueprint share ID
1911-
1912-
</dd>
1913-
</dl>
1914-
1915-
<dl>
1916-
<dd>
1917-
1918-
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
1919-
1920-
</dd>
1921-
</dl>
1922-
</dd>
1923-
</dl>
1924-
1925-
19261856
</dd>
19271857
</dl>
19281858
</details>

src/label_studio_sdk/blueprints/client.py

Lines changed: 0 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from json.decoder import JSONDecodeError
99
from ..core.api_error import ApiError
1010
from ..core.jsonable_encoder import jsonable_encoder
11-
from ..errors.not_found_error import NotFoundError
1211
from ..core.client_wrapper import AsyncClientWrapper
1312

1413
# this is used as the default value for optional parameters
@@ -135,58 +134,6 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] =
135134
raise ApiError(status_code=_response.status_code, body=_response.text)
136135
raise ApiError(status_code=_response.status_code, body=_response_json)
137136

138-
def create_project_from_blueprint(
139-
self, share_id: str, *, request_options: typing.Optional[RequestOptions] = None
140-
) -> None:
141-
"""
142-
Create a new project from an existing blueprint. On success, user is redirected to the new project with a 302.
143-
144-
Parameters
145-
----------
146-
share_id : str
147-
Blueprint share ID
148-
149-
request_options : typing.Optional[RequestOptions]
150-
Request-specific configuration.
151-
152-
Returns
153-
-------
154-
None
155-
156-
Examples
157-
--------
158-
from label_studio_sdk import LabelStudio
159-
160-
client = LabelStudio(
161-
api_key="YOUR_API_KEY",
162-
)
163-
client.blueprints.create_project_from_blueprint(
164-
share_id="share_id",
165-
)
166-
"""
167-
_response = self._client_wrapper.httpx_client.request(
168-
f"api/blueprints/{jsonable_encoder(share_id)}/create-project",
169-
method="GET",
170-
request_options=request_options,
171-
)
172-
try:
173-
if 200 <= _response.status_code < 300:
174-
return
175-
if _response.status_code == 404:
176-
raise NotFoundError(
177-
typing.cast(
178-
typing.Optional[typing.Any],
179-
construct_type(
180-
type_=typing.Optional[typing.Any], # type: ignore
181-
object_=_response.json(),
182-
),
183-
)
184-
)
185-
_response_json = _response.json()
186-
except JSONDecodeError:
187-
raise ApiError(status_code=_response.status_code, body=_response.text)
188-
raise ApiError(status_code=_response.status_code, body=_response_json)
189-
190137

191138
class AsyncBlueprintsClient:
192139
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -323,63 +270,3 @@ async def main() -> None:
323270
except JSONDecodeError:
324271
raise ApiError(status_code=_response.status_code, body=_response.text)
325272
raise ApiError(status_code=_response.status_code, body=_response_json)
326-
327-
async def create_project_from_blueprint(
328-
self, share_id: str, *, request_options: typing.Optional[RequestOptions] = None
329-
) -> None:
330-
"""
331-
Create a new project from an existing blueprint. On success, user is redirected to the new project with a 302.
332-
333-
Parameters
334-
----------
335-
share_id : str
336-
Blueprint share ID
337-
338-
request_options : typing.Optional[RequestOptions]
339-
Request-specific configuration.
340-
341-
Returns
342-
-------
343-
None
344-
345-
Examples
346-
--------
347-
import asyncio
348-
349-
from label_studio_sdk import AsyncLabelStudio
350-
351-
client = AsyncLabelStudio(
352-
api_key="YOUR_API_KEY",
353-
)
354-
355-
356-
async def main() -> None:
357-
await client.blueprints.create_project_from_blueprint(
358-
share_id="share_id",
359-
)
360-
361-
362-
asyncio.run(main())
363-
"""
364-
_response = await self._client_wrapper.httpx_client.request(
365-
f"api/blueprints/{jsonable_encoder(share_id)}/create-project",
366-
method="GET",
367-
request_options=request_options,
368-
)
369-
try:
370-
if 200 <= _response.status_code < 300:
371-
return
372-
if _response.status_code == 404:
373-
raise NotFoundError(
374-
typing.cast(
375-
typing.Optional[typing.Any],
376-
construct_type(
377-
type_=typing.Optional[typing.Any], # type: ignore
378-
object_=_response.json(),
379-
),
380-
)
381-
)
382-
_response_json = _response.json()
383-
except JSONDecodeError:
384-
raise ApiError(status_code=_response.status_code, body=_response.text)
385-
raise ApiError(status_code=_response.status_code, body=_response_json)

tests/test_blueprints.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,3 @@ async def test_delete(client: LabelStudio, async_client: AsyncLabelStudio) -> No
4949
await async_client.blueprints.delete(id="id") # type: ignore[func-returns-value]
5050
is None
5151
)
52-
53-
54-
async def test_create_project_from_blueprint(client: LabelStudio, async_client: AsyncLabelStudio) -> None:
55-
# Type ignore to avoid mypy complaining about the function not being meant to return a value
56-
assert (
57-
client.blueprints.create_project_from_blueprint(share_id="share_id") # type: ignore[func-returns-value]
58-
is None
59-
)
60-
61-
assert (
62-
await async_client.blueprints.create_project_from_blueprint(share_id="share_id") # type: ignore[func-returns-value]
63-
is None
64-
)

0 commit comments

Comments
 (0)