sift_client.resources.assets
¶
| CLASS | DESCRIPTION |
|---|---|
AssetsAPIAsync |
High-level API for interacting with assets. |
AssetsAPIAsync
¶
AssetsAPIAsync(sift_client: SiftClient)
Bases: ResourceBase
High-level API for interacting with assets.
This class provides a Pythonic, notebook-friendly interface for interacting with the AssetsAPI. It handles automatic handling of gRPC services, seamless type conversion, and clear error handling.
All methods in this class use the Asset class from the low-level wrapper, which is a user-friendly representation of an asset using standard Python data structures and types.
Initialize the AssetsAPI.
| PARAMETER | DESCRIPTION |
|---|---|
sift_client
|
The Sift client to use.
TYPE:
|
| METHOD | DESCRIPTION |
|---|---|
archive |
Archive an asset. |
find |
Find a single asset matching the given query. Takes the same arguments as |
get |
Get an Asset. |
list_ |
List assets with optional filtering. |
update |
Update an Asset. |
archive
async
¶
find
async
¶
find(**kwargs) -> Asset | None
Find a single asset matching the given query. Takes the same arguments as list_. If more than one asset is found,
raises an error.
| PARAMETER | DESCRIPTION |
|---|---|
**kwargs
|
Keyword arguments to pass to
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
Asset | None
|
The Asset found or None. |
get
async
¶
list_
async
¶
list_(
*,
name: str | None = None,
name_contains: str | None = None,
name_regex: str | Pattern | None = None,
asset_ids: list[str] | None = None,
created_after: datetime | None = None,
created_before: datetime | None = None,
modified_after: datetime | None = None,
modified_before: datetime | None = None,
created_by: Any | None = None,
modified_by: Any | None = None,
tags: list[str] | None = None,
tag_ids: list[str] | None = None,
metadata: list[Any] | None = None,
include_archived: bool = False,
filter_query: str | None = None,
order_by: str | None = None,
limit: int | None = None,
) -> list[Asset]
List assets with optional filtering.
| PARAMETER | DESCRIPTION |
|---|---|
asset_ids
|
List of asset IDs to filter by. |
name
|
Exact name of the asset.
TYPE:
|
name_contains
|
Partial name of the asset.
TYPE:
|
name_regex
|
Regular expression string to filter assets by name. |
asset_ids
|
List of asset IDs to filter by. |
created_after
|
Created after this date.
TYPE:
|
created_before
|
Created before this date.
TYPE:
|
modified_after
|
Modified after this date.
TYPE:
|
modified_before
|
Modified before this date.
TYPE:
|
created_by
|
Assets created by this user.
TYPE:
|
modified_by
|
Assets last modified by this user.
TYPE:
|
tags
|
Assets with these tags. |
tag_ids
|
List of asset tag IDs to filter by. |
metadata
|
metadata filter |
include_archived
|
Include archived assets.
TYPE:
|
filter_query
|
Explicit CEL query to filter assets.
TYPE:
|
order_by
|
How to order the retrieved assets. # TODO: tooling for this?
TYPE:
|
limit
|
How many assets to retrieve. If None, retrieves all matches.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[Asset]
|
A list of Assets that matches the filter. |