Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.17.12"
".": "0.18.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 27
openapi_spec_hash: c70c3eccfe803e99c14e97e650b1e314
config_hash: 1f7626e569e1a74574a58d7883170a0e
configured_endpoints: 28
openapi_spec_hash: 5f7962599290c70cb47c05c3b29fdbd8
config_hash: f1c0c034bd832878eb47146c51afdd55
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 0.18.0 (2026-03-06)

Full Changelog: [v0.17.12...v0.18.0](https://github.com/openlayer-ai/openlayer-python/compare/v0.17.12...v0.18.0)

### Features

* **api:** update POST /rows to use list method name ([675f015](https://github.com/openlayer-ai/openlayer-python/commit/675f01562b6e284e31fb0170a827df5036ab4555))
* **closes OPEN-9425:** document /rows endpoint in API reference and … ([9c293e6](https://github.com/openlayer-ai/openlayer-python/commit/9c293e60c0730a5dea1d53506c2c7ad42d6de698))

## 0.17.12 (2026-03-06)

Full Changelog: [v0.17.11...v0.17.12](https://github.com/openlayer-ai/openlayer-python/compare/v0.17.11...v0.17.12)
Expand Down
3 changes: 2 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,13 @@ Methods:
Types:

```python
from openlayer.types.inference_pipelines import RowUpdateResponse
from openlayer.types.inference_pipelines import RowUpdateResponse, RowListResponse
```

Methods:

- <code title="put /inference-pipelines/{inferencePipelineId}/rows">client.inference_pipelines.rows.<a href="./src/openlayer/resources/inference_pipelines/rows.py">update</a>(inference_pipeline_id, \*\*<a href="src/openlayer/types/inference_pipelines/row_update_params.py">params</a>) -> <a href="./src/openlayer/types/inference_pipelines/row_update_response.py">RowUpdateResponse</a></code>
- <code title="post /inference-pipelines/{inferencePipelineId}/rows">client.inference_pipelines.rows.<a href="./src/openlayer/resources/inference_pipelines/rows.py">list</a>(inference_pipeline_id, \*\*<a href="src/openlayer/types/inference_pipelines/row_list_params.py">params</a>) -> <a href="./src/openlayer/types/inference_pipelines/row_list_response.py">RowListResponse</a></code>

## TestResults

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openlayer"
version = "0.17.12"
version = "0.18.0"
description = "The official Python library for the openlayer API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/openlayer/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "openlayer"
__version__ = "0.17.12" # x-release-please-version
__version__ = "0.18.0" # x-release-please-version
175 changes: 172 additions & 3 deletions src/openlayer/resources/inference_pipelines/rows.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

from __future__ import annotations

from typing import Optional
from typing import Iterable, Optional

import httpx

from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import maybe_transform, async_maybe_transform
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
Expand All @@ -17,7 +17,8 @@
async_to_streamed_response_wrapper,
)
from ..._base_client import make_request_options
from ...types.inference_pipelines import row_update_params
from ...types.inference_pipelines import row_list_params, row_update_params
from ...types.inference_pipelines.row_list_response import RowListResponse
from ...types.inference_pipelines.row_update_response import RowUpdateResponse

__all__ = ["RowsResource", "AsyncRowsResource"]
Expand Down Expand Up @@ -94,6 +95,84 @@ def update(
cast_to=RowUpdateResponse,
)

def list(
self,
inference_pipeline_id: str,
*,
asc: bool | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
sort_column: str | Omit = omit,
column_filters: Optional[Iterable[row_list_params.ColumnFilter]] | Omit = omit,
exclude_row_id_list: Optional[Iterable[int]] | Omit = omit,
not_search_query_and: Optional[SequenceNotStr[str]] | Omit = omit,
not_search_query_or: Optional[SequenceNotStr[str]] | Omit = omit,
row_id_list: Optional[Iterable[int]] | Omit = omit,
search_query_and: Optional[SequenceNotStr[str]] | Omit = omit,
search_query_or: Optional[SequenceNotStr[str]] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> RowListResponse:
"""
A list of rows for an inference pipeline.

Args:
asc: Whether or not to sort on the sortColumn in ascending order.

page: The page to return in a paginated query.

per_page: Maximum number of items to return per page.

sort_column: Name of the column to sort on

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not inference_pipeline_id:
raise ValueError(
f"Expected a non-empty value for `inference_pipeline_id` but received {inference_pipeline_id!r}"
)
return self._post(
f"/inference-pipelines/{inference_pipeline_id}/rows",
body=maybe_transform(
{
"column_filters": column_filters,
"exclude_row_id_list": exclude_row_id_list,
"not_search_query_and": not_search_query_and,
"not_search_query_or": not_search_query_or,
"row_id_list": row_id_list,
"search_query_and": search_query_and,
"search_query_or": search_query_or,
},
row_list_params.RowListParams,
),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform(
{
"asc": asc,
"page": page,
"per_page": per_page,
"sort_column": sort_column,
},
row_list_params.RowListParams,
),
),
cast_to=RowListResponse,
)


class AsyncRowsResource(AsyncAPIResource):
@cached_property
Expand Down Expand Up @@ -166,6 +245,84 @@ async def update(
cast_to=RowUpdateResponse,
)

async def list(
self,
inference_pipeline_id: str,
*,
asc: bool | Omit = omit,
page: int | Omit = omit,
per_page: int | Omit = omit,
sort_column: str | Omit = omit,
column_filters: Optional[Iterable[row_list_params.ColumnFilter]] | Omit = omit,
exclude_row_id_list: Optional[Iterable[int]] | Omit = omit,
not_search_query_and: Optional[SequenceNotStr[str]] | Omit = omit,
not_search_query_or: Optional[SequenceNotStr[str]] | Omit = omit,
row_id_list: Optional[Iterable[int]] | Omit = omit,
search_query_and: Optional[SequenceNotStr[str]] | Omit = omit,
search_query_or: Optional[SequenceNotStr[str]] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> RowListResponse:
"""
A list of rows for an inference pipeline.

Args:
asc: Whether or not to sort on the sortColumn in ascending order.

page: The page to return in a paginated query.

per_page: Maximum number of items to return per page.

sort_column: Name of the column to sort on

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not inference_pipeline_id:
raise ValueError(
f"Expected a non-empty value for `inference_pipeline_id` but received {inference_pipeline_id!r}"
)
return await self._post(
f"/inference-pipelines/{inference_pipeline_id}/rows",
body=await async_maybe_transform(
{
"column_filters": column_filters,
"exclude_row_id_list": exclude_row_id_list,
"not_search_query_and": not_search_query_and,
"not_search_query_or": not_search_query_or,
"row_id_list": row_id_list,
"search_query_and": search_query_and,
"search_query_or": search_query_or,
},
row_list_params.RowListParams,
),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform(
{
"asc": asc,
"page": page,
"per_page": per_page,
"sort_column": sort_column,
},
row_list_params.RowListParams,
),
),
cast_to=RowListResponse,
)


class RowsResourceWithRawResponse:
def __init__(self, rows: RowsResource) -> None:
Expand All @@ -174,6 +331,9 @@ def __init__(self, rows: RowsResource) -> None:
self.update = to_raw_response_wrapper(
rows.update,
)
self.list = to_raw_response_wrapper(
rows.list,
)


class AsyncRowsResourceWithRawResponse:
Expand All @@ -183,6 +343,9 @@ def __init__(self, rows: AsyncRowsResource) -> None:
self.update = async_to_raw_response_wrapper(
rows.update,
)
self.list = async_to_raw_response_wrapper(
rows.list,
)


class RowsResourceWithStreamingResponse:
Expand All @@ -192,6 +355,9 @@ def __init__(self, rows: RowsResource) -> None:
self.update = to_streamed_response_wrapper(
rows.update,
)
self.list = to_streamed_response_wrapper(
rows.list,
)


class AsyncRowsResourceWithStreamingResponse:
Expand All @@ -201,3 +367,6 @@ def __init__(self, rows: AsyncRowsResource) -> None:
self.update = async_to_streamed_response_wrapper(
rows.update,
)
self.list = async_to_streamed_response_wrapper(
rows.list,
)
2 changes: 2 additions & 0 deletions src/openlayer/types/inference_pipelines/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

from .row_list_params import RowListParams as RowListParams
from .row_list_response import RowListResponse as RowListResponse
from .row_update_params import RowUpdateParams as RowUpdateParams
from .data_stream_params import DataStreamParams as DataStreamParams
from .row_update_response import RowUpdateResponse as RowUpdateResponse
Expand Down
77 changes: 77 additions & 0 deletions src/openlayer/types/inference_pipelines/row_list_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing import Union, Iterable, Optional
from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict

from ..._types import SequenceNotStr
from ..._utils import PropertyInfo

__all__ = [
"RowListParams",
"ColumnFilter",
"ColumnFilterSetColumnFilter",
"ColumnFilterNumericColumnFilter",
"ColumnFilterStringColumnFilter",
]


class RowListParams(TypedDict, total=False):
asc: bool
"""Whether or not to sort on the sortColumn in ascending order."""

page: int
"""The page to return in a paginated query."""

per_page: Annotated[int, PropertyInfo(alias="perPage")]
"""Maximum number of items to return per page."""

sort_column: Annotated[str, PropertyInfo(alias="sortColumn")]
"""Name of the column to sort on"""

column_filters: Annotated[Optional[Iterable[ColumnFilter]], PropertyInfo(alias="columnFilters")]

exclude_row_id_list: Annotated[Optional[Iterable[int]], PropertyInfo(alias="excludeRowIdList")]

not_search_query_and: Annotated[Optional[SequenceNotStr[str]], PropertyInfo(alias="notSearchQueryAnd")]

not_search_query_or: Annotated[Optional[SequenceNotStr[str]], PropertyInfo(alias="notSearchQueryOr")]

row_id_list: Annotated[Optional[Iterable[int]], PropertyInfo(alias="rowIdList")]

search_query_and: Annotated[Optional[SequenceNotStr[str]], PropertyInfo(alias="searchQueryAnd")]

search_query_or: Annotated[Optional[SequenceNotStr[str]], PropertyInfo(alias="searchQueryOr")]


class ColumnFilterSetColumnFilter(TypedDict, total=False):
measurement: Required[str]
"""The name of the column."""

operator: Required[Literal["contains_none", "contains_any", "contains_all", "one_of", "none_of"]]

value: Required[SequenceNotStr[Union[str, float]]]


class ColumnFilterNumericColumnFilter(TypedDict, total=False):
measurement: Required[str]
"""The name of the column."""

operator: Required[Literal[">", ">=", "is", "<", "<=", "!="]]

value: Required[Optional[float]]


class ColumnFilterStringColumnFilter(TypedDict, total=False):
measurement: Required[str]
"""The name of the column."""

operator: Required[Literal["is", "!="]]

value: Required[Union[str, bool]]


ColumnFilter: TypeAlias = Union[
ColumnFilterSetColumnFilter, ColumnFilterNumericColumnFilter, ColumnFilterStringColumnFilter
]
15 changes: 15 additions & 0 deletions src/openlayer/types/inference_pipelines/row_list_response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List

from ..._models import BaseModel

__all__ = ["RowListResponse", "Item"]


class Item(BaseModel):
openlayer_row_id: int


class RowListResponse(BaseModel):
items: List[Item]
Loading