Getting Started
Installation
pip install capo-qconnect
Usage
from capo_qconnect import AsyncQConnectClient
async def main():
async with AsyncQConnectClient() as q_connect:
# Example: call the list_tags_for_resource operation
response = await q_connect.list_tags_for_resource()
print(response["tags"])
Pagination
Some operations in this SDK support pagination. If the operation supports pagination it will have an iter_ prefixed method that returns an async iterator.
from capo_qconnect import AsyncQConnectClient
async def main():
async with AsyncQConnectClient() as q_connect:
# Example: paginate over list_assistants
async for item in q_connect.iter_list_assistants():
print(item)
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_qconnect import AsyncQConnectClient
from capo_qconnect.error import ResourceNotFoundException
async def main():
async with AsyncQConnectClient() as q_connect:
try:
await q_connect.list_tags_for_resource()
except ResourceNotFoundException as e:
print(f"Error: {e}")
print(e.data) # additional error data
Retrying
The SDK retries failed operations automatically. Retry behaviour follows the Smithy specification: errors are retried based on their is_retryable and is_throttling_error attributes. Throttling errors use a longer base delay. Network-level failures (connection errors and timeouts) are also retried. Non-retryable errors, such as client errors without the @retryable trait, are raised immediately without further attempts.
The number of attempts defaults to 3 and can be changed at the client level via retry_max_attempts, or per call via config_overrides.
from capo_qconnect import AsyncQConnectClient
async def main():
async with AsyncQConnectClient() as q_connect:
# Default: 3 attempts for every operation
response = await q_connect.list_tags_for_resource()
# Override per operation
response = await q_connect.list_tags_for_resource(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await q_connect.list_tags_for_resource(config_overrides={"retry_max_attempts": 1})
Metadata
Release files for capo-qconnect 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| capo_qconnect-0.7.0.tar.gz | 307.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_qconnect-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / capo_qconnect-0.7.0.tar.gz
| Download URL | capo_qconnect-0.7.0.tar.gz |
|---|---|
| Size | 307.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fd715df3d41579db84c68d6e83f16b2c0af7bcebefe0f783f9e9afd7a33bc28
|
|
BLAKE2b-256 checksum How to use checksums |
509e2f42fcbf7ad95fe4d942fa9eb112bc551d71fbb8cf98f4bc6683145c59cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / capo_qconnect-0.7.0-py3-none-any.whl
| Download URL | capo_qconnect-0.7.0-py3-none-any.whl |
|---|---|
| Size | 807.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
10c58fe41c76651782ca7a6143962abe0aaff310a3aaad7695a0fbdbdbeaa784
|
|
BLAKE2b-256 checksum How to use checksums |
a52fe12103c447e8339f403f1729345c5b5de9777c7c4c67ae5ab950bc1c7fff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|