cloud-storage-client-2.4.3
توضیحات
-
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | cloud-storage-client-2.4.3 |
| نام | cloud-storage-client |
| نسخه کتابخانه | 2.4.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Pablo Aguirre |
| ایمیل نویسنده | paguirrerubio@gmail.com |
| آدرس صفحه اصلی | https://pypi.org/project/cloud-storage-client/ |
| آدرس اینترنتی | https://pypi.org/project/cloud-storage-client/ |
| مجوز | MIT |
### 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')
````
نیازمندی
| مقدار | نام |
|---|---|
| ==1.12.250 | botocore |
| ==1.9.250 | boto3 |
| ==1.22.4 | google-api-core |
| ==1.4.3 | google-cloud-core |
| ==1.32.0 | google-cloud-storage |
| ==12.3.0 | azure-storage-blob |
| ==0.2.9 | pysftp |
| ==1.0.1 | ssh-agent-setup |
نحوه نصب
نصب پکیج whl cloud-storage-client-2.4.3:
pip install cloud-storage-client-2.4.3.whl
نصب پکیج tar.gz cloud-storage-client-2.4.3:
pip install cloud-storage-client-2.4.3.tar.gz