A multi-platform cloud storage utility
Project description
Cloud Storage Utility
A Python based cloud utility to help you transfer files to and from multiple cloud providers under one CLI/API.
Usage
Configuration
To configure this application, you have to set a few environment variables.
# You can use 'azure' or 'ibm'
CSUTIL_CLOUD_PLATFORM=
# You only need to set these if you intend to use ibm
CSUTIL_IBM_API_KEY=
CSUTIL_IBM_AUTH_ENDPOINT=
CSUTIL_IBM_COS_ENDPOINT=
CSUTIL_IBM_CRN=
# You only need to set these if you intend to use azure
CSUTIL_AZURE_STORAGE_ACCOUNT_NAME=
CSUTIL_AZURE_TENANT_ID=
CSUTIL_AZURE_CLIENT_ID=
CSUTIL_AZURE_CLIENT_SECRET=
# set them all if you intend to use this tool for both platforms
By default, the CLI will attempt to use IBM
CLI Commands
You can use csutil --help
to see an exhaustive list of options and commands
csutil delete <bucket name> <filename>
csutil list-remote <bucket name>
csutil pull <bucket name> <destination directory> <cloud-files>
csutil push <bucket name> <local-files>
Here are some examples
csutil delete *.txt example-bucket
csutil delete *.txt *.md example.csv example-bucket
csutil list-remote example-bucket
csutil pull example-bucket ./dat *
csutil pull example-bucket ./dat tmp.txt tmp2.txt *.md
csutil push example-bucket ./dat/*
csutil push example-bucket/test_directory ./dat/tmp.txt ./dat/tmp2.txt
Developing Locally
We use pipenv
to manage packages. If you don't already have it installed, make sure to install it via pip install pipenv
.
We also use python-dotenv
for managing env vars for local development, so you can create a .env file for yourself and set the relevant vars that way.
Deploy to pypi
Make sure you have the venv activated pipenv shell
Build python3 setup.py sdist bdist_wheel
Deploy python3 -m twine upload --repository testpypi dist/*
Here's a good sample of a similar project https://github.com/pypa/sampleproject
Additional Resources
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
Built Distribution
Hashes for cloud-storage-utility-0.0.1.dev1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06546d0432d11cf889a2bf4ec5112add89225d34fe3fe3bec73b33cec83acc5f |
|
MD5 | 24e26fc50adca0bed50cde4326b86100 |
|
BLAKE2b-256 | adfb702bccd0fc4882652140c438e8b291815fa18b5451a8f33ebb1af40ccb60 |
Hashes for cloud_storage_utility-0.0.1.dev1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eae9f41884a55ec5627684a9bde6bdba714dd1c0c8e1352455a53108e827d281 |
|
MD5 | 6a6e289ec1c92d3ac9c7147fcdab7cf4 |
|
BLAKE2b-256 | 815a02bcfc0384412146a8fca465523f760658848d91f2005797c22a76bf74cc |