Skip to content

Commit ddab034

Browse files
committed
release: 0.0.1.dev3
1 parent 1264eb2 commit ddab034

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ A client owns an HTTP connection pool, so it should be closed when you are done
7171
import asyncio
7272
from qca import AsyncManaged
7373

74+
7475
async def main() -> None:
7576
async with AsyncManaged() as client:
7677
async for agent in client.agents.list(limit=20):
@@ -79,6 +80,7 @@ async def main() -> None:
7980
first_page = await client.sessions.list(limit=10)
8081
print(first_page.data)
8182

83+
8284
asyncio.run(main())
8385
```
8486

@@ -218,8 +220,8 @@ print(identity._request_id)
218220
Certain errors are retried twice by default with exponential backoff. GET and HEAD requests, and any request carrying an idempotency key, are retried on connection errors, 408, 429, and 5xx; other requests are retried on 429 only. A 409 is never retried automatically, and an SSE stream that has already been established is never retried. Within those rules the SDK honors `x-should-retry` and a valid `Retry-After-Ms` or `Retry-After`.
219221

220222
```python
221-
client = Forward(max_retries=0) # disable for all requests
222-
client.with_options(max_retries=5).sessions.list() # or override per call site
223+
client = Forward(max_retries=0) # disable for all requests
224+
client.with_options(max_retries=5).sessions.list() # or override per call site
223225
```
224226

225227
`with_options` returns a separately configured client that shares the original connection pool, so closing either one closes that pool.
@@ -230,7 +232,7 @@ The default timeout is 10 seconds to connect and 60 seconds for each subsequent
230232

231233
```python
232234
client = Forward(timeout=30.0)
233-
client.sessions.retrieve("sess-id", timeout=5.0) # per request
235+
client.sessions.retrieve("sess-id", timeout=5.0) # per request
234236
```
235237

236238
Timeouts apply per HTTP phase and per attempt, not to the whole call including retries. End-to-end deadlines are the caller's responsibility; async code can wrap a call in `asyncio.wait_for`.
@@ -250,10 +252,10 @@ List methods return a page that iterates across page boundaries for you.
250252

251253
```python
252254
page = client.sessions.list(limit=20)
253-
print(page.data) # just this page
255+
print(page.data) # just this page
254256
print(page.has_next_page())
255257

256-
for session in page: # fetches subsequent pages as needed
258+
for session in page: # fetches subsequent pages as needed
257259
print(session.id)
258260

259261
for page in client.sessions.list().iter_pages():
@@ -280,9 +282,7 @@ from pathlib import Path
280282

281283
file = client.files.upload(file=Path("report.txt"))
282284

283-
skill = client.skills.create(
284-
files=[("example/SKILL.md", b"---\nname: example\n---\nExample skill")]
285-
)
285+
skill = client.skills.create(files=[("example/SKILL.md", b"---\nname: example\n---\nExample skill")])
286286

287287
with client.files.download(file.id) as content:
288288
content.write_to_file("downloaded.txt")
@@ -310,8 +310,8 @@ Request parameters are `TypedDict`s, declared per mode in `types/*_params.py`. P
310310
from qca import NOT_GIVEN
311311

312312
client.identities.update("identity-id", name=NOT_GIVEN) # omit the field
313-
client.identities.update("identity-id", name=None) # send null
314-
client.identities.update("identity-id", enabled=False) # send false
313+
client.identities.update("identity-id", name=None) # send null
314+
client.identities.update("identity-id", enabled=False) # send false
315315

316316
identity = client.identities.retrieve("identity-id")
317317
print(identity.to_dict(), identity.to_json())

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "qca"
3-
version = "0.0.1.dev2"
3+
version = "0.0.1.dev3"
44
description = "Typed synchronous and asynchronous clients for Qoder Cloud Agents"
55
authors = [{name = "Qoder"}]
66
license = "MIT"

0 commit comments

Comments
 (0)