This is a command line interface for easy operation with blobs in Azure Blob Storage.
Project description
blobcli
This is a command line interface for easy operation with blobs in Azure Blob Storage.
Installation
$ pip install blobcli
Usage
Set connection string to environment variable
$ export AZURE_STORAGE_CONNECTION_STRING="<yourconnectionstring>"
$ blobcli
Usage: blobcli [OPTIONS] COMMAND [ARGS]...
blob storage easy operation cli (v*.*.*)
Options:
--help Show this message and exit.
Commands:
cp Copy blob.
ls List containers or blobs.
mv Move blob.
rm Delete blob.
List containers or blobs
$ blobcli ls <target>
Show list of containers
$ blobcli ls
2021-04-04 12:41:09+00:00 samplecontainer01
2021-04-04 12:41:19+00:00 samplecontainer02
2021-04-04 12:41:26+00:00 samplecontainer03
Show list of blobs for the specified container
$ blobcli ls samplecontainer01
PRE sample-dir01/
PRE sample-dir02/
2021-04-04 12:43:49+00:00 0B sample01.txt
2021-04-04 12:43:54+00:00 0B sample02.txt
2021-04-04 12:43:58+00:00 0B sample03.txt
$ blobcli ls samplecontainer01/sample-dir01/
2021-04-04 12:56:27+00:00 0B sample04.txt
2021-04-04 12:57:27+00:00 0B sample05.txt
Delete blob
$ blobcli rm <target>
Delete the specified blob
$ blobcli rm blob://samplecontainer01/sample03.txt
delete: blob://samplecontainer01/sample03.txt
Move blob
$ blobcli mv <source> <target>
Move blob from local to container
$ blobcli mv sample05.txt blob://samplecontainer01/sample-dir01/
move: sample05.txt to blob://samplecontainer01/sample-dir01/
container to local
$ blobcli mv blob://samplecontainer01/sample-dir01/sample05.txt .
move: blob://samplecontainer01/sample-dir01/sample05.txt to .
container to container
$ blobcli mv blob://samplecontainer01/sample01.txt blob://samplecontainer02/sample11.txt
move: blob://samplecontainer01/sample01.txt to blob://samplecontainer02/sample11.txt
Copy blob
$ blobcli cp <source> <target>
Copy blob from local to container
$ blobcli cp sample05.txt blob://samplecontainer01/sample-dir01/
copy: sample05.txt to blob://samplecontainer01/sample-dir01/
container to local
$ blobcli cp blob://samplecontainer01/sample-dir01/sample05.txt .
copy: blob://samplecontainer01/sample-dir01/sample05.txt to .
container to container
$ blobcli cp blob://samplecontainer01/sample01.txt blob://samplecontainer02/sample11.txt
copy: blob://samplecontainer01/sample01.txt to blob://samplecontainer02/sample11.txt
License
This project are released under the MIT License
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
blobcli-0.0.6.tar.gz
(5.2 kB
view hashes)