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.5.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.5.0.tar.gz | 383.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_database_migration_service-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.3 MB
Release files / capo_database_migration_service-0.5.0.tar.gz
| Download URL | capo_database_migration_service-0.5.0.tar.gz |
|---|---|
| Size | 383.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f8d61f62204594eb7d0706cf2dde994059f3d13d92e65bc98183baee8aab089
|
|
BLAKE2b-256 checksum How to use checksums |
ad6618043af777f5f2a10f1f8a259a3d690844394e7f1624c7b791e07d0d9121
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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.5.0-py3-none-any.whl
| Download URL | capo_database_migration_service-0.5.0-py3-none-any.whl |
|---|---|
| Size | 921.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b138292b05f6d3aaddafa6afc3c9233bd04bb8a17dc574a4e07958cb4357fc87
|
|
BLAKE2b-256 checksum How to use checksums |
5ae29090112c5b179a5ca2302940484ecc80f41f2d6422e108768cb5bd4af122
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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}
|