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.8.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.8.0.tar.gz | 393.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_database_migration_service-0.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.3 MB
Release files / capo_database_migration_service-0.8.0.tar.gz
| Download URL | capo_database_migration_service-0.8.0.tar.gz |
|---|---|
| Size | 393.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6b6d0d78a4db072e13e8945ed1cf9a07a62e24f54de1d93d8e579ec21ce3085
|
|
BLAKE2b-256 checksum How to use checksums |
e42449a92dcba496588fc684e292dbad436e6ac7f9fa205f388ee1f2151c84e8
|
| 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.8.0-py3-none-any.whl
| Download URL | capo_database_migration_service-0.8.0-py3-none-any.whl |
|---|---|
| Size | 932.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4aedc9d9f56c2bda7fc156597710972f357e85158b04a7620a43308bb116de33
|
|
BLAKE2b-256 checksum How to use checksums |
2a9ebfe164dde7975ee45134bc9d3bc848bfc27b0f15303d55b4f66a84bf8e25
|
| 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}
|