11from __future__ import annotations
22
3- from typing import NamedTuple
4-
53from sift_client .errors import _sift_client_experimental_warning
64from sift_client .resources import (
75 AssetsAPI ,
2220 WithGrpcClient ,
2321 WithRestClient ,
2422)
23+ from sift_client .util .util import AsyncAPIs
2524
2625_sift_client_experimental_warning ()
2726
2827
29- class AsyncAPIs (NamedTuple ):
30- """Simple accessor for the asynchronous APIs, still uses the SiftClient instance."""
31-
32- """Instance of the Ping API for making asynchronous requests."""
33- ping : PingAPIAsync
34- """Instance of the Assets API for making asynchronous requests."""
35- assets : AssetsAPIAsync
36- """Instance of the Calculated Channels API for making asynchronous requests."""
37- calculated_channels : CalculatedChannelsAPIAsync
38- """Instance of the Runs API for making asynchronous requests."""
39- runs : RunsAPIAsync
40-
41-
4228class SiftClient (
4329 WithGrpcClient ,
4430 WithRestClient ,
@@ -48,7 +34,7 @@ class SiftClient(
4834
4935 It provides both synchronous and asynchronous interfaces, strong type checking, and a Pythonic API design.
5036
51- Example usage :
37+ Examples :
5238 from sift_client import SiftClient
5339 from datetime import datetime
5440
@@ -72,14 +58,21 @@ class SiftClient(
7258 response = await sift.async_.ping.ping()
7359 """
7460
75- """Instance of the Ping API for making synchronous requests."""
61+
7662 ping : PingAPI
77- """Instance of the Assets API for making synchronous requests."""
63+ """Instance of the Ping API for making synchronous requests."""
64+
7865 assets : AssetsAPI
79- """Instance of the Calculated Channels API for making synchronous requests."""
66+ """Instance of the Assets API for making synchronous requests."""
67+
8068 calculated_channels : CalculatedChannelsAPI
81- """Instance of the Runs API for making synchronous requests."""
69+ """Instance of the Calculated Channels API for making synchronous requests."""
70+
8271 runs : RunsAPI
72+ """Instance of the Runs API for making synchronous requests."""
73+
74+ async_ : AsyncAPIs
75+ """Accessor for the asynchronous APIs. All asynchronous APIs are available as attributes on this accessor."""
8376
8477 def __init__ (
8578 self ,
0 commit comments