Provides a seamless way to operate between AWS S3 and Azure Blob Storage
Project description
S3BlobSync
S3BlobSync provides a seamless way to operate between two of the major cloud platforms: AWS S3 and Azure Blob Storage. With a focus on data transfer and synchronization, this tool simplifies cloud operations, making it easier for developers and administrators to manage their resources across different platforms.
Features
- Data Download: Easily download data from Azure or AWS S3.
- Data Transfer: Transfer data seamlessly from AWS S3 to Azure Blob.
Installation
Install S3BlobSync easily via pip:
pip install s3blobsync
Configuration
Create a .env file for AWS and Azure credentials, referencing .env.example.
Command-Line Entry Points
Post-installation, the following command-line tools are available:
- Sync Data:
s3blobsync - List S3 Bucket Contents:
list_s3 - Download from AWS S3:
download_s3 - Download from Azure Blob Storage:
download_blob
Usage examples:
s3blobsync --env_file <path_to_env_file>
list_s3 --env_file <path_to_env_file>
download_s3 --patterns 'foo*.gz,bar*.gz' --env_file <path_to_env_file>
download_blob --patterns 'foo*.gz,bar*.gz' --env_file <path_to_env_file>
Dependencies
These dependencies are automatically installed with pip:
boto3azure-storage-blobtqdmpython-dotenv
Using S3BlobSync in Scripts
After installing via pip, S3BlobSync can be used as a library in your Python scripts:
Syncing Data from AWS S3 to Azure Blob Storage
from s3blobsync import s3blobsync
s3blobsync(env_file='path_to_your_env_file')
Downloading Data from AWS S3
from s3blobsync import download_s3
download_s3(patterns=['foo*.gz', 'bar*.gz'], env_file='path_to_your_env_file')
Downloading Data from Azure Blob Storage
from s3blobsync import download_blob
download_blob(patterns=['foo*.gz', 'bar*.gz'], env_file='path_to_your_env_file')
Listing Contents of S3 Bucket
from s3blobsync import list_s3
list_s3(env_file='path_to_your_env_file')
Alternative Installation and Usage
For a more manual approach, clone the GitHub repository and install the dependencies. When running scripts directly, use the module execution method to avoid relative import issues:
python3 -m s3blobsync.s3blobsync --env_file <path_to_env_file>
python3 -m s3blobsync.download_s3 --patterns 'foo*.gz,bar*.gz' --env_file <path_to_env_file>
python3 -m s3blobsync.download_blob --patterns 'foo*.gz,bar*.gz' --env_file <path_to_env_file>
python3 -m s3blobsync.list_s3 --env_file <path_to_env_file>
Advanced Usage
- Pattern Filtering: Apply
--patternsfor file name filtering (comma-separated). - Custom Environment File: Use
--env_fileto specify a custom.envfile (defaults to '.env').
Contributing
Contributions are welcome. Please open an issue first for significant changes.
License
S3BlobSync is under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 s3blobsync-1.3.tar.gz.
File metadata
- Download URL: s3blobsync-1.3.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
571fca2408db54ca34128f9faefa991a28d8c5f239348c9441a8eed5a49b8005
|
|
| MD5 |
bcaf512ea72a4b37eb62079056eaa678
|
|
| BLAKE2b-256 |
f4254aed5f96b840afc158cea819c5caa410de196635739e43a3ffe12f3a2730
|
File details
Details for the file s3blobsync-1.3-py3-none-any.whl.
File metadata
- Download URL: s3blobsync-1.3-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a76447ed018cc0d3b27ad7531fb6c3aa37a73d99109f254fde6e6be4bc5d120
|
|
| MD5 |
7bde61d83bd9f63e8e70d42d10aba8cc
|
|
| BLAKE2b-256 |
10f5b9a1c9c2183666f98bd3976eaa3e171d9b8ab0f1c13fc03dcd5e841cc6c9
|