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
5 changes: 5 additions & 0 deletions python/lib/sift_client/resources/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ async def get_data(
start_time: datetime | None = None,
end_time: datetime | None = None,
limit: int | None = None,
ignore_cache: bool = False,
) -> dict[str, pd.DataFrame]:
"""Get data for one or more channels.

Expand All @@ -187,6 +188,7 @@ async def get_data(
start_time: The start time to get data for.
end_time: The end time to get data for.
limit: The maximum number of data points to return. Will be in increments of page_size or default page size defined by the call if no page_size is provided.
ignore_cache: Whether to ignore cached data and fetch fresh data from the server.

Returns:
A dictionary mapping channel names to pandas DataFrames containing the channel data.
Expand All @@ -200,6 +202,7 @@ async def get_data(
start_time=start_time,
end_time=end_time,
max_results=limit,
ignore_cache=ignore_cache,
)

async def get_data_as_arrow(
Expand All @@ -210,6 +213,7 @@ async def get_data_as_arrow(
start_time: datetime | None = None,
end_time: datetime | None = None,
limit: int | None = None,
ignore_cache: bool = False,
) -> dict[str, pa.Table]:
"""Get data for one or more channels as pyarrow tables."""
from pyarrow import Table as ArrowTable
Expand All @@ -221,5 +225,6 @@ async def get_data_as_arrow(
start_time=start_time,
end_time=end_time,
limit=limit,
ignore_cache=ignore_cache,
)
return {k: ArrowTable.from_pandas(v) for k, v in data.items()}
3 changes: 3 additions & 0 deletions python/lib/sift_client/resources/sync_stubs/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ class ChannelsAPI:
start_time: datetime | None = None,
end_time: datetime | None = None,
limit: int | None = None,
ignore_cache: bool = False,
) -> dict[str, pd.DataFrame]:
"""Get data for one or more channels.

Expand All @@ -441,6 +442,7 @@ class ChannelsAPI:
start_time: The start time to get data for.
end_time: The end time to get data for.
limit: The maximum number of data points to return. Will be in increments of page_size or default page size defined by the call if no page_size is provided.
ignore_cache: Whether to ignore cached data and fetch fresh data from the server.

Returns:
A dictionary mapping channel names to pandas DataFrames containing the channel data.
Expand All @@ -455,6 +457,7 @@ class ChannelsAPI:
start_time: datetime | None = None,
end_time: datetime | None = None,
limit: int | None = None,
ignore_cache: bool = False,
) -> dict[str, pa.Table]:
"""Get data for one or more channels as pyarrow tables."""
...
Expand Down
10 changes: 5 additions & 5 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ all = [
'pyOpenSSL<24.0.0',
'pyarrow>=17.0.0',
'rosbags~=0.0',
'sift-stream-bindings>=0.2.0-rc',
'sift-stream-bindings>=0.2.0-rc2',
'types-pyOpenSSL<24.0.0',
]
build = [
Expand Down Expand Up @@ -100,7 +100,7 @@ dev-all = [
'pytest==8.2.2',
'rosbags~=0.0',
'ruff~=0.12.10',
'sift-stream-bindings>=0.2.0-rc',
'sift-stream-bindings>=0.2.0-rc2',
'tomlkit~=0.13.3',
'types-pyOpenSSL<24.0.0',
]
Expand Down Expand Up @@ -153,7 +153,7 @@ docs-build = [
'pytest==8.2.2',
'rosbags~=0.0',
'ruff~=0.12.10',
'sift-stream-bindings>=0.2.0-rc',
'sift-stream-bindings>=0.2.0-rc2',
'tomlkit~=0.13.3',
'types-pyOpenSSL<24.0.0',
]
Expand All @@ -176,10 +176,10 @@ rosbags = [
'rosbags~=0.0',
]
sift-stream = [
'sift-stream-bindings>=0.2.0-rc',
'sift-stream-bindings>=0.2.0-rc2',
]
sift-stream-bindings = [
'sift-stream-bindings>=0.2.0-rc',
'sift-stream-bindings>=0.2.0-rc2',
]
tdms = [
'npTDMS~=1.9',
Expand Down
Loading