Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cloud-storage-client

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloud-storage-client

  • 2.4.3
  • PyPI
  • Socket score

Maintainers
2

Install

pip3 install cloud-storage-client

Deploy

python3 setup.py sdist
twine upload dist/*

Example usage

from cloud_storage_client import storage
import os

storageClient = storage.StorageClient(
    os.environ['STORAGE_PROVIDER'], # GOOGLE_CLOUD_STORAGE = 'GCS', AMAZON_S3 = 'S3', AZURE_BLOB_STORAGE = 'ABS'
    os.environ['STORAGE_BUCKET_NAME'],
    os.getenv('STORAGE_ACCESS_KEY'),
    os.getenv('STORAGE_SECRET_KEY'))

# Delete single file
storageClient.delete_file('path/file.py')

# Delete a virtual folder
storageClient.delete_folder('path')

# Download a folder
storageClient.download_folder('folder_destination_name', '/Users/user/Downloads')

# Upload a local file
storageClient.upload_file('/Users/user/Documents/my-file.yaml', 'my-file.yaml')

# Download single file
storageClient.download_file('virtual_path', 'file.py', '/Users/user/Documents')

# Upload a folder
storageClient.upload_folder('folder_destination_name', '/Users/user/Documents', do_tar=False, do_compress=False)

# Upload local files
storageClient.upload_files('folder_destination_name', ['file01.py', 'file02.py'], '/Users/user/Documents', do_tar=False, do_compress=False)

# List remote files over a virtual path / directory
storageClient.list_files_folder('folder_destination_name')

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc