Getting Started
Installation
pip install capo-elastic-transcoder
Usage
from capo_elastic_transcoder import AsyncElasticTranscoderClient
async def main():
async with AsyncElasticTranscoderClient() as elastic_transcoder:
# Example: call the cancel_job operation
response = await elastic_transcoder.cancel_job()
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_elastic_transcoder import AsyncElasticTranscoderClient
async def main():
async with AsyncElasticTranscoderClient() as elastic_transcoder:
# Example: paginate over list_jobs_by_pipeline
async for item in elastic_transcoder.iter_list_jobs_by_pipeline():
print(item)
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_elastic_transcoder import AsyncElasticTranscoderClient
from capo_elastic_transcoder.error import AccessDeniedException
async def main():
async with AsyncElasticTranscoderClient() as elastic_transcoder:
try:
await elastic_transcoder.cancel_job()
except AccessDeniedException 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_elastic_transcoder import AsyncElasticTranscoderClient
async def main():
async with AsyncElasticTranscoderClient() as elastic_transcoder:
# Default: 3 attempts for every operation
response = await elastic_transcoder.cancel_job()
# Override per operation
response = await elastic_transcoder.cancel_job(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await elastic_transcoder.cancel_job(config_overrides={"retry_max_attempts": 1})
Metadata
Release files for capo-elastic-transcoder 0.3.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_elastic_transcoder-0.3.0.tar.gz | 129.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_elastic_transcoder-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 361.6 kB
Release files / capo_elastic_transcoder-0.3.0.tar.gz
| Download URL | capo_elastic_transcoder-0.3.0.tar.gz |
|---|---|
| Size | 129.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
667bb05145ea8ea014557ad49f68c6d6e1ef8512e29100dde6e4e343c25a9f25
|
|
BLAKE2b-256 checksum How to use checksums |
505349a52d0b9e6832268c3a8511e9a75f65076e4eedc6354db0f78943ca652a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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_elastic_transcoder-0.3.0-py3-none-any.whl
| Download URL | capo_elastic_transcoder-0.3.0-py3-none-any.whl |
|---|---|
| Size | 231.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
856e8ad165e398c81e027a36287d186d4d201ddd47a1e6d1c50c595ef2f35af0
|
|
BLAKE2b-256 checksum How to use checksums |
45035a4f9b729872b13600fa770dfac8d799195cc1e8c4074d707ea16c07fbc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.22 {"installer":{"name":"uv","version":"0.12.22","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}
|