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.dev2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d86ccb3e877c44890bc01de9df2a4ea263baba62a1ba285076c157e3c13c00b |
|
MD5 | 75db2e267c4da252ce7761d65712b11d |
|
BLAKE2b-256 | 5fd84f10491cea159d4e061342e5a7de0cf3bb68324cba5d0a8171f77ab8c3d4 |
Hashes for cloud_storage_utility-0.0.1.dev2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bfc083e41603f0d8e7d57e87f8801bbb96a539181e51bb703a5ef2c74474269 |
|
MD5 | 8950de3cc6b8eadb3dfd7ee0af6f9304 |
|
BLAKE2b-256 | 4690fea0b971caa71b98639c7da69dbac964a04f79056aa8d95b28523ddd292d |