Getting Started
Installation
pip install capo-iotsecuretunneling
Usage
from capo_iotsecuretunneling import AsyncIoTSecureTunnelingClient
async def main():
async with AsyncIoTSecureTunnelingClient() as io_t_secure_tunneling:
# Example: call the close_tunnel operation
response = await io_t_secure_tunneling.close_tunnel()
print(response)
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_iotsecuretunneling import AsyncIoTSecureTunnelingClient
async def main():
async with AsyncIoTSecureTunnelingClient() as io_t_secure_tunneling:
# Example: paginate over list_tunnels
async for item in io_t_secure_tunneling.iter_list_tunnels():
print(item)
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_iotsecuretunneling import AsyncIoTSecureTunnelingClient
from capo_iotsecuretunneling.error import ResourceNotFoundException
async def main():
async with AsyncIoTSecureTunnelingClient() as io_t_secure_tunneling:
try:
await io_t_secure_tunneling.close_tunnel()
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_iotsecuretunneling import AsyncIoTSecureTunnelingClient
async def main():
async with AsyncIoTSecureTunnelingClient() as io_t_secure_tunneling:
# Default: 3 attempts for every operation
response = await io_t_secure_tunneling.close_tunnel()
# Override per operation
response = await io_t_secure_tunneling.close_tunnel(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await io_t_secure_tunneling.close_tunnel(config_overrides={"retry_max_attempts": 1})
Metadata
Release files for capo-iotsecuretunneling 0.4.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_iotsecuretunneling-0.4.0.tar.gz | 62.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_iotsecuretunneling-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 159.1 kB
Release files / capo_iotsecuretunneling-0.4.0.tar.gz
| Download URL | capo_iotsecuretunneling-0.4.0.tar.gz |
|---|---|
| Size | 62.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1be13d46b59eaa574091086ad516386cdf368c13818eccf6815819ce361b518
|
|
BLAKE2b-256 checksum How to use checksums |
255429598f86cfc8b2a2233a062391dce98af8695392271de2499cf6cbd5b1a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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_iotsecuretunneling-0.4.0-py3-none-any.whl
| Download URL | capo_iotsecuretunneling-0.4.0-py3-none-any.whl |
|---|---|
| Size | 96.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed97bc6fbdb8bdad9de4b02711d92fed0a028ebcf724a8cf0a6666fbde9edec1
|
|
BLAKE2b-256 checksum How to use checksums |
92143a726cb8e8c9707d5dfa0b7d3f68e265cb7a8b11b60e74a2a60ddd6304f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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}
|