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})
Release files for capo-database-migration-service 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_database_migration_service-0.1.0.tar.gz | 368.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| capo_database_migration_service-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.3 MB
Release files / capo_database_migration_service-0.1.0.tar.gz
| Download URL | capo_database_migration_service-0.1.0.tar.gz |
|---|---|
| Size | 368.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
db557d1b755981ba8b332b849d98372ae06abacb7f4a501a1f1ae41249a1d91f
|
|
BLAKE2b-256 checksum How to use checksums |
0e7df0811243eeb4c4109d342f4fc99ea3a5f3c9f56b2a5402b7b9515b85c2f3
|
| 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_database_migration_service-0.1.0-py3-none-any.whl
| Download URL | capo_database_migration_service-0.1.0-py3-none-any.whl |
|---|---|
| Size | 903.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16966cc0556cbaf70d4950705dd07273f704f5a78c86dfc0e0e7a948aca6ff16
|
|
BLAKE2b-256 checksum How to use checksums |
0ea75520be42c5c7e4405d65cc05f3b77bf27374b9e896816b73700b98ac30c5
|
| 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}
|