This folder contains Python scripts for integrating various cloud storage services, providing functions for uploading, downloading, and managing files across different providers.
Amazon S3 is a scalable storage service by Amazon Web Services, commonly used for file storage and backups.
-
File:
aws_s3_storage.py
-
Setup:
- Install AWS SDK:
pip install boto3
. - Configure AWS credentials with access to S3.
- Install AWS SDK:
-
Example Usage:
from aws_s3_storage import upload_file, download_file upload_file("local_file.txt", "my-s3-bucket", "s3_file.txt") download_file("my-s3-bucket", "s3_file.txt", "downloaded_file.txt")
Azure Blob Storage is Microsoft's cloud storage solution for storing large amounts of unstructured data.
-
File:
azure_blob_storage.py
-
Setup:
- Install Azure SDK:
pip install azure-storage-blob
. - Configure Azure storage account and access keys.
- Install Azure SDK:
-
Example Usage:
from azure_blob_storage import upload_blob, download_blob upload_blob("local_file.txt", "my-container", "blob_name.txt") download_blob("my-container", "blob_name.txt", "downloaded_file.txt")
Google Cloud Storage is a unified object storage service by Google, suitable for storing large datasets and backups.
-
File:
gcp_storage.py
-
Setup:
- Install Google Cloud client:
pip install google-cloud-storage
. - Configure Google Cloud credentials.
- Install Google Cloud client:
-
Example Usage:
from gcp_storage import upload_file, download_file upload_file("local_file.txt", "my-gcs-bucket", "gcs_file.txt") download_file("my-gcs-bucket", "gcs_file.txt", "downloaded_file.txt")
Google Drive provides file storage and synchronization service by Google, allowing users to store and share files.
-
File:
google_drive_storage.py
-
Setup:
- Install Google Drive client:
pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client
. - Configure OAuth credentials for Google Drive API.
- Install Google Drive client:
-
Example Usage:
from google_drive_storage import upload_to_drive, download_from_drive upload_to_drive("local_file.txt", "Drive Folder ID") download_from_drive("Drive File ID", "downloaded_file.txt")
- Clone the repository and navigate to the
storage
folder. - Install any required dependencies as mentioned in each section.
- Configure your credentials for each storage provider.
- Run the scripts to upload or download files using the specified storage service.
Contributions are welcome! If you’d like to add more storage providers or enhance existing implementations, please submit a pull request with a detailed description of your changes.