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.dev3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3df3042a067b0676f7931bc6852241b8cb542232e4b2159c135856f26fd1ab14 |
|
MD5 | 28b49c9b4de51a4718303d3a910adb45 |
|
BLAKE2b-256 | e7ad27efe18bbb16b7fdd1ea77be13a4e05067a237e574ebe6b73ebbdad90c76 |
Hashes for cloud_storage_utility-0.0.1.dev3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff51d6435d6ee063b28af497fd448460e0dcb2aabe2b9ef419ca50261f7dd9ec |
|
MD5 | 71bc8937e24d04a59bc119e190f87bbf |
|
BLAKE2b-256 | 840e50d3d13bf8221b29a185b30beacbb407d022bbb1e98829318363d97b4a5a |