Skip to main content

A unified cloud storage package for AWS, Azure, and GCP

Project description

Cloud Storage Service

A unified cloud storage package that provides seamless integration with major cloud providers: Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP). This library allows developers to easily access and manage cloud storage services with a consistent interface.

Package Structure

- storage_manager.py   # Factory function to create DB connection based on the service type
- aws_storage.py       # AWS RDS MySQL connection class
- azure_storage.py     # Azure SQL Database connection class        
- gcp_storage.py       # Google Cloud MySQL connection class

Features

  • Supports Multiple Cloud Providers: Easily switch between AWS, Azure, and GCP.
  • Flexible Configuration: Configure services with required parameters for each provider.
  • Intuitive API: Simple methods for managing cloud storage operations.

Installation

Ensure all necessary dependencies are installed:

pip install cloud_storage_service

Usage

#! pip install cloud_storage_service

from cloud_storage_service import get_cloud_storage_service

def test_get_document_details():
    bucket_name = 'testbucket'
    prefix = '000740194c8c-adfe-2ab061872773d3/test_data/'  

    aws_service = get_cloud_storage_service('aws')

    try:
        documents = aws_service.get_document_details(bucket_name, prefix=prefix, file_type='.xml')
        
        if documents:
            print("Fetched document details:")
            for doc_name, doc_info in documents.items():
                print(f"Document Name: {doc_info['document_name']}")
                print(f"Document Hash: {doc_info['document_hash']}")
                print(f"Document Size: {doc_info['document_size']} bytes")
                print(f"File Type: {doc_info['file_type']}")
                print("-" * 40)
        else:
            print("No documents found.")
    
    except Exception as e:
        print(f"Error occurred: {e}")

test_get_document_details()

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

cloud_storage_service-0.2.21.tar.gz (31.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cloud_storage_service-0.2.21-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

Details for the file cloud_storage_service-0.2.21.tar.gz.

File metadata

  • Download URL: cloud_storage_service-0.2.21.tar.gz
  • Upload date:
  • Size: 31.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for cloud_storage_service-0.2.21.tar.gz
Algorithm Hash digest
SHA256 1c417edb3564d66f4af760e3c60f721a5d95ab2116a72e803b0cd90401fa3bc9
MD5 5ec76e0b570c7a28b0ce2c78f409954a
BLAKE2b-256 0f41f2eba28e00b193f10d6c8f05d5926a52ad1c9cc1c1d67248c9148a01aff0

See more details on using hashes here.

File details

Details for the file cloud_storage_service-0.2.21-py3-none-any.whl.

File metadata

File hashes

Hashes for cloud_storage_service-0.2.21-py3-none-any.whl
Algorithm Hash digest
SHA256 1b1d53a23ef2cae66c6873cb06c3a6581b91a129c572dd25ad90aeb9008647b2
MD5 1a50fb49faa78a85bde5b0bbd09f8a40
BLAKE2b-256 f55c8a638c50e62102af4b0bb14c71949cd32597fb1b8c42a5638036afcc731b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page