No project description provided
Project description
Intall
````
pip3 install cloud-storage-client
````
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')
````
````
pip3 install cloud-storage-client
````
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')
````
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
Close
Hashes for cloud_storage_client-0.0.14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4b47d710442be62a815e611ef265c99039fb283fc0b1d4887bffe9073430c57 |
|
MD5 | a5883a752b8e9dad230fd828dc4c2c9f |
|
BLAKE2b-256 | a029ac241285b3dbb96eed7153f4dbd199abb37b531f2ab9dd176e06d983b8d0 |