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})
Release files for capo-elastic-transcoder 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_elastic_transcoder-0.1.0.tar.gz | 121.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_elastic_transcoder-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 347.8 kB
Release files / capo_elastic_transcoder-0.1.0.tar.gz
| Download URL | capo_elastic_transcoder-0.1.0.tar.gz |
|---|---|
| Size | 121.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c2b0e5bbc454c034bb47b25ab88f15e7af8668b03a68f6be7b7f8880fdff683
|
|
BLAKE2b-256 checksum How to use checksums |
3cf2ba48c266aea9825f0f6adca1a0fefab53a20321ebccff528cefe5a6abce5
|
| 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_elastic_transcoder-0.1.0-py3-none-any.whl
| Download URL | capo_elastic_transcoder-0.1.0-py3-none-any.whl |
|---|---|
| Size | 226.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8bb0eee6c45581bb9831ea537b01109cbda5a5d91ff4453649a51dfba03a2fe2
|
|
BLAKE2b-256 checksum How to use checksums |
47c3edfddeb87890d2f302211a3eac12f38c1f63481c22a2f9ed11a8bc440ad3
|
| 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}
|