Getting Started
Installation
pip install capo-iottwinmaker
Usage
from capo_iottwinmaker import AsyncIoTTwinMakerClient
async def main():
async with AsyncIoTTwinMakerClient() as io_t_twin_maker:
# Example: call the batch_put_property_values operation
response = await io_t_twin_maker.batch_put_property_values()
print(response["error_entries"])
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_iottwinmaker import AsyncIoTTwinMakerClient
async def main():
async with AsyncIoTTwinMakerClient() as io_t_twin_maker:
# Example: paginate over execute_query
async for item in io_t_twin_maker.iter_execute_query():
print(item)
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_iottwinmaker import AsyncIoTTwinMakerClient
from capo_iottwinmaker.error import InternalServerException
async def main():
async with AsyncIoTTwinMakerClient() as io_t_twin_maker:
try:
await io_t_twin_maker.batch_put_property_values()
except InternalServerException 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_iottwinmaker import AsyncIoTTwinMakerClient
async def main():
async with AsyncIoTTwinMakerClient() as io_t_twin_maker:
# Default: 3 attempts for every operation
response = await io_t_twin_maker.batch_put_property_values()
# Override per operation
response = await io_t_twin_maker.batch_put_property_values(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await io_t_twin_maker.batch_put_property_values(config_overrides={"retry_max_attempts": 1})
Release files for capo-iottwinmaker 0.1.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_iottwinmaker-0.1.0.tar.gz | 125.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_iottwinmaker-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 463.5 kB
Release files / capo_iottwinmaker-0.1.0.tar.gz
| Download URL | capo_iottwinmaker-0.1.0.tar.gz |
|---|---|
| Size | 125.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d514beb15a8f7b12aaef22dd777f9dd172ddbb1da3d3d59c7c6b3dd6ab911e0d
|
|
BLAKE2b-256 checksum How to use checksums |
004a3811815415d3df82defb533509e592194416b730d655b45bbd01cb78ac34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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_iottwinmaker-0.1.0-py3-none-any.whl
| Download URL | capo_iottwinmaker-0.1.0-py3-none-any.whl |
|---|---|
| Size | 337.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
207ca5a0191cd7925de148ccb081c92f3cdb941725d2761fe25e3e7334498343
|
|
BLAKE2b-256 checksum How to use checksums |
a1a3782e67f424113cf50dc7877f881b66fca0748f7c6f1be0a3210be5d4fb6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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}
|