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.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_database_migration_service-0.3.0.tar.gz | 383.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_database_migration_service-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.3 MB
Release files / capo_database_migration_service-0.3.0.tar.gz
| Download URL | capo_database_migration_service-0.3.0.tar.gz |
|---|---|
| Size | 383.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
001e7b0b42428956848b3924d2d955b89ca7718c03df9aa9d99f101a87e398d4
|
|
BLAKE2b-256 checksum How to use checksums |
c66ec13869413a4d34dbe3389f81ad7d501afc08eac571bdff4972c9964c017f
|
| 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_database_migration_service-0.3.0-py3-none-any.whl
| Download URL | capo_database_migration_service-0.3.0-py3-none-any.whl |
|---|---|
| Size | 920.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a8114c60be8f6bac365be2c93d386e48738dc690d8a8e5e3ae98905b69d7e0f
|
|
BLAKE2b-256 checksum How to use checksums |
559aaa2ba3e444de933950ba4f0ec029ae39070664df7ea2c64201398c394a81
|
| 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}
|