Lightweight SDK for cross-region data replication in AWS
Project description
awsreplicate
A lightweight Python SDK for cross-region data replication in AWS.
Features
- Async S3 bucket replication using
aioboto3 - DynamoDB table replication between regions
- Concurrent operations with configurable limits
- Automatic retry logic with exponential backoff
- Structured logging with
structlog - Comprehensive test coverage with
moto
Installation
pip install awsreplicate
For development:
pip install awsreplicate[dev]
Quick Start
import asyncio
from awsreplicate import AWSConfig, S3Replicator
async def main():
# Configure AWS
config = AWSConfig()
# Create replicator
replicator = S3Replicator(
config=config,
source_region="us-east-1",
target_region="us-west-1",
max_concurrent=20
)
# Replicate bucket
result = await replicator.replicate_bucket(
source_bucket="my-source-bucket",
target_bucket="my-target-bucket"
)
print(f"Replicated {result['successful']} objects")
asyncio.run(main())
Development
# Install in development mode
pip install -e .[dev]
# Run tests
pytest
# Format code
black awsreplicate tests
# Lint
ruff check awsreplicate tests
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
awsreplicate-0.1.1.tar.gz
(8.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file awsreplicate-0.1.1.tar.gz.
File metadata
- Download URL: awsreplicate-0.1.1.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6562f8a0968b46f7558e2c2dfe513013ec598123b8fc39950226145378a093fa
|
|
| MD5 |
177f0194166780d4f5a8f5f9c7c90edb
|
|
| BLAKE2b-256 |
ecfca0150527ce8acd9d2ad40100864f69e0febc82204be9508ea3c5c76e3965
|
File details
Details for the file awsreplicate-0.1.1-py3-none-any.whl.
File metadata
- Download URL: awsreplicate-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d93ee45cfc0f8c6ae36737b8158ba37d164b86d557fede5f824f621fb283aad
|
|
| MD5 |
0830326330eba1f151e62e723258eb34
|
|
| BLAKE2b-256 |
85129b06a8ad0d74938b65d0f160f06c2dd73f404525b8abda545490d58cc1ec
|