Getting Started
Installation
pip install capo-database-migration-service
Usage
from capo_database_migration_service import AsyncDatabaseMigrationServiceClient
async def main():
async with AsyncDatabaseMigrationServiceClient() as database_migration_service:
# Example: call the add_tags_to_resource operation
response = await database_migration_service.add_tags_to_resource()
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_database_migration_service import AsyncDatabaseMigrationServiceClient
async def main():
async with AsyncDatabaseMigrationServiceClient() as database_migration_service:
# Example: paginate over describe_applicable_individual_assessments
async for item in database_migration_service.iter_describe_applicable_individual_assessments():
print(item)
Error Handling
The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
from capo_database_migration_service import AsyncDatabaseMigrationServiceClient
from capo_database_migration_service.error import InvalidResourceStateFault
async def main():
async with AsyncDatabaseMigrationServiceClient() as database_migration_service:
try:
await database_migration_service.add_tags_to_resource()
except InvalidResourceStateFault 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_database_migration_service import AsyncDatabaseMigrationServiceClient
async def main():
async with AsyncDatabaseMigrationServiceClient() as database_migration_service:
# Default: 3 attempts for every operation
response = await database_migration_service.add_tags_to_resource()
# Override per operation
response = await database_migration_service.add_tags_to_resource(config_overrides={"retry_max_attempts": 5})
# Disable retries for this call
response = await database_migration_service.add_tags_to_resource(config_overrides={"retry_max_attempts": 1})
Metadata
Release files for capo-database-migration-service 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_database_migration_service-0.7.0.tar.gz | 392.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_database_migration_service-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.3 MB
Release files / capo_database_migration_service-0.7.0.tar.gz
| Download URL | capo_database_migration_service-0.7.0.tar.gz |
|---|---|
| Size | 392.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4464ef1bebe7249425f46edff814015b51d0b21ec5cd9094b86c08fdb0cd74e
|
|
BLAKE2b-256 checksum How to use checksums |
f0a4af40072ba3ecb4deac08d3bcba72838866d1e44ae8761d4f28855e1831c7
|
| 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_database_migration_service-0.7.0-py3-none-any.whl
| Download URL | capo_database_migration_service-0.7.0-py3-none-any.whl |
|---|---|
| Size | 931.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7b43c4d1386224ce98e49ddbb742ce0ce25bb92efbd15b2b63aa90dbe250d4e9
|
|
BLAKE2b-256 checksum How to use checksums |
7ab7a53698ea278a4db51144e177eb86f544033d96134b9a8e018f0a64b3a951
|
| 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}
|