Skip to content

Commit fa8c8b3

Browse files
committed
SDK regeneration
1 parent 2377d25 commit fa8c8b3

File tree

181 files changed

+4541
-3560
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+4541
-3560
lines changed

README.md

+14-12
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Instantiate and use the client with the following:
2222
```python
2323
from truefoundry_sdk import TrueFoundry
2424
client = TrueFoundry(api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", )
25-
client.v1.users.invite_user(accept_invite_client_url='<control plane url>/invite-accept', email='email', )
25+
client.users.invite_user(accept_invite_client_url='<control plane url>/invite-accept', email='email', )
2626
```
2727

2828
## Async Client
@@ -34,8 +34,9 @@ from truefoundry_sdk import AsyncTrueFoundry
3434
import asyncio
3535
client = AsyncTrueFoundry(api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", )
3636
async def main() -> None:
37-
await client.v1.users.invite_user(accept_invite_client_url='<control plane url>/invite-accept', email='email', )
38-
asyncio.run(main())```
37+
await client.users.invite_user(accept_invite_client_url='<control plane url>/invite-accept', email='email', )
38+
asyncio.run(main())
39+
```
3940

4041
## Exception Handling
4142

@@ -45,7 +46,7 @@ will be thrown.
4546
```python
4647
from truefoundry_sdk.core.api_error import ApiError
4748
try:
48-
client.v1.users.invite_user(...)
49+
client.users.invite_user(...)
4950
except ApiError as e:
5051
print(e.status_code)
5152
print(e.body)
@@ -58,7 +59,7 @@ Paginated requests will return a `SyncPager` or `AsyncPager`, which can be used
5859
```python
5960
from truefoundry_sdk import TrueFoundry
6061
client = TrueFoundry(api_key="YOUR_API_KEY", base_url="https://yourhost.com/path/to/api", )
61-
response = client.v1.users.list(limit=10, offset=0, )
62+
response = client.users.list(limit=10, offset=0, )
6263
for item in response:
6364
yield item
6465
# alternatively, you can paginate page-by-page
@@ -76,14 +77,15 @@ The `.with_raw_response` property returns a "raw" client that can be used to acc
7677
```python
7778
from truefoundry_sdk import TrueFoundry
7879
client = TrueFoundry(..., )
79-
response = client.v1.users.with_raw_response.invite_user(...)
80+
response = client.users.with_raw_response.invite_user(...)
8081
print(response.headers) # access the response headers
8182
print(response.data) # access the underlying object
82-
response = client.v1.users.with_raw_response.list(...)
83-
print(response.headers) # access the response headers
84-
for item in response.data:
83+
pager = client.users.list(...)
84+
print(pager.response.headers) # access the response headers for the first page
85+
for item in pager:
8586
print(item) # access the underlying object(s)
86-
for page in response.data.iter_pages():
87+
for page in pager.iter_pages():
88+
print(page.response.headers) # access the response headers for each page
8789
for item in page:
8890
print(item) # access the underlying object(s)
8991
```
@@ -103,7 +105,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
103105
Use the `max_retries` request option to configure this behavior.
104106

105107
```python
106-
client.v1.users.invite_user(..., request_options={
108+
client.users.invite_user(..., request_options={
107109
"max_retries": 1
108110
})
109111
```
@@ -118,7 +120,7 @@ from truefoundry_sdk import TrueFoundry
118120
client = TrueFoundry(..., timeout=20.0, )
119121

120122
# Override timeout for a specific method
121-
client.v1.users.invite_user(..., request_options={
123+
client.users.invite_user(..., request_options={
122124
"timeout_in_seconds": 1
123125
})
124126
```

poetry.lock

+6-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)