1717from sift_client ._internal .low_level_wrappers .base import (
1818 LowLevelClientBase ,
1919)
20+ from sift_client .sift_types .asset import Asset , AssetUpdate
2021from sift_client .transport import GrpcClient , WithGrpcClient
21- from sift_client .types .asset import Asset , AssetUpdate
2222
2323# Configure logging
2424logger = logging .getLogger (__name__ )
2525
2626
2727class AssetsLowLevelClient (LowLevelClientBase , WithGrpcClient ):
28- """
29- Low-level client for the AssetsAPI.
28+ """Low-level client for the AssetsAPI.
3029
3130 This class provides a thin wrapper around the autogenerated bindings for the AssetsAPI.
3231 """
3332
3433 def __init__ (self , grpc_client : GrpcClient ):
35- """
36- Initialize the AssetsLowLevelClient.
34+ """Initialize the AssetsLowLevelClient.
3735
3836 Args:
3937 grpc_client: The gRPC client to use for making API calls.
@@ -43,7 +41,7 @@ def __init__(self, grpc_client: GrpcClient):
4341 async def get_asset (self , asset_id : str ) -> Asset :
4442 request = GetAssetRequest (asset_id = asset_id )
4543 response = await self ._grpc_client .get_stub (AssetServiceStub ).GetAsset (request )
46- grpc_asset = cast (GetAssetResponse , response ).asset
44+ grpc_asset = cast (" GetAssetResponse" , response ).asset
4745 return Asset ._from_proto (grpc_asset )
4846
4947 async def list_all_assets (
@@ -53,8 +51,7 @@ async def list_all_assets(
5351 max_results : int | None = None ,
5452 page_size : int | None = None ,
5553 ) -> list [Asset ]:
56- """
57- List all results matching the given query.
54+ """List all results matching the given query.
5855
5956 Args:
6057 query_filter: The CEL query filter.
@@ -93,14 +90,14 @@ async def list_assets(
9390
9491 request = ListAssetsRequest (** request_kwargs )
9592 response = await self ._grpc_client .get_stub (AssetServiceStub ).ListAssets (request )
96- response = cast (ListAssetsResponse , response )
93+ response = cast (" ListAssetsResponse" , response )
9794 return [Asset ._from_proto (asset ) for asset in response .assets ], response .next_page_token
9895
9996 async def update_asset (self , update : AssetUpdate ) -> Asset :
10097 grpc_asset , update_mask = update .to_proto_with_mask ()
10198 request = UpdateAssetRequest (asset = grpc_asset , update_mask = update_mask )
10299 response = await self ._grpc_client .get_stub (AssetServiceStub ).UpdateAsset (request )
103- updated_grpc_asset = cast (UpdateAssetResponse , response ).asset
100+ updated_grpc_asset = cast (" UpdateAssetResponse" , response ).asset
104101 return Asset ._from_proto (updated_grpc_asset )
105102
106103 async def delete_asset (self , asset_id : str , archive_runs : bool = False ) -> None :
0 commit comments