@@ -27,6 +27,10 @@ Instantiate and use the client with the following:
2727
2828``` python
2929from truefoundry_sdk import TrueFoundry
30+ from truefoundry_sdk.applications import (
31+ ApplicationsListRequestDeviceTypeFilter,
32+ ApplicationsListRequestLifecycleStage,
33+ )
3034
3135client = TrueFoundry(
3236 api_key = " YOUR_API_KEY" ,
@@ -35,6 +39,21 @@ client = TrueFoundry(
3539response = client.applications.list(
3640 limit = 10 ,
3741 offset = 0 ,
42+ application_id = " applicationId" ,
43+ workspace_id = " workspaceId" ,
44+ application_name = " applicationName" ,
45+ fqn = " fqn" ,
46+ workspace_fqn = " workspaceFqn" ,
47+ application_type = " applicationType" ,
48+ name_search_query = " nameSearchQuery" ,
49+ environment_id = " environmentId" ,
50+ cluster_id = " clusterId" ,
51+ application_set_id = " applicationSetId" ,
52+ paused = True ,
53+ device_type_filter = ApplicationsListRequestDeviceTypeFilter.CPU ,
54+ last_deployed_by_subjects = " lastDeployedBySubjects" ,
55+ lifecycle_stage = ApplicationsListRequestLifecycleStage.ACTIVE ,
56+ is_recommendation_present_and_visible = True ,
3857)
3958for item in response:
4059 yield item
@@ -45,12 +64,16 @@ for page in response.iter_pages():
4564
4665## Async Client
4766
48- The SDK also exports an ` async ` client so that you can make non-blocking calls to our API.
67+ The SDK also exports an ` async ` client so that you can make non-blocking calls to our API. Note that if you are constructing an Async httpx client class to pass into this client, use ` httpx.AsyncClient() ` instead of ` httpx.Client() ` (e.g. for the ` httpx_client ` parameter of this client).
4968
5069``` python
5170import asyncio
5271
5372from truefoundry_sdk import AsyncTrueFoundry
73+ from truefoundry_sdk.applications import (
74+ ApplicationsListRequestDeviceTypeFilter,
75+ ApplicationsListRequestLifecycleStage,
76+ )
5477
5578client = AsyncTrueFoundry(
5679 api_key = " YOUR_API_KEY" ,
@@ -62,6 +85,21 @@ async def main() -> None:
6285 response = await client.applications.list(
6386 limit = 10 ,
6487 offset = 0 ,
88+ application_id = " applicationId" ,
89+ workspace_id = " workspaceId" ,
90+ application_name = " applicationName" ,
91+ fqn = " fqn" ,
92+ workspace_fqn = " workspaceFqn" ,
93+ application_type = " applicationType" ,
94+ name_search_query = " nameSearchQuery" ,
95+ environment_id = " environmentId" ,
96+ cluster_id = " clusterId" ,
97+ application_set_id = " applicationSetId" ,
98+ paused = True ,
99+ device_type_filter = ApplicationsListRequestDeviceTypeFilter.CPU ,
100+ last_deployed_by_subjects = " lastDeployedBySubjects" ,
101+ lifecycle_stage = ApplicationsListRequestLifecycleStage.ACTIVE ,
102+ is_recommendation_present_and_visible = True ,
65103 )
66104 async for item in response:
67105 yield item
@@ -103,6 +141,9 @@ client = TrueFoundry(
103141response = client.users.list(
104142 limit = 10 ,
105143 offset = 0 ,
144+ query = " query" ,
145+ show_invalid_users = True ,
146+ include_virtual_accounts = " includeVirtualAccounts" ,
106147)
107148for item in response:
108149 yield item
@@ -189,7 +230,7 @@ from truefoundry_sdk import TrueFoundry
189230client = TrueFoundry(
190231 ... ,
191232 httpx_client = httpx.Client(
192- proxies = " http://my.test.proxy.example.com" ,
233+ proxy = " http://my.test.proxy.example.com" ,
193234 transport = httpx.HTTPTransport(local_address = " 0.0.0.0" ),
194235 ),
195236)
0 commit comments