Skip to main content

This is a command line interface for easy operation with blobs in Azure Blob Storage.

Project description

blobcli

release status PyPI version MIT License

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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blobcli-0.0.6-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file blobcli-0.0.6.tar.gz.

File metadata

  • Download URL: blobcli-0.0.6.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for blobcli-0.0.6.tar.gz
Algorithm Hash digest
SHA256 33aa4b2ea91491203eb8ce803ac32506a2ace453c7d43509789bea8c59c97bb5
MD5 93da9b5e7879407fa8c4e2357cf89a5d
BLAKE2b-256 baafc85776926dad20fbf2647e27943df68bb3476b209093943b14771b62f9b9

See more details on using hashes here.

File details

Details for the file blobcli-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: blobcli-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for blobcli-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3731b036d50779091fbba00f463c2ed68dd18b6f30df68f77ec9e9946126d5f0
MD5 ec647123042567d66f830ab283fa6cb7
BLAKE2b-256 447209c98b16fd9c766d28fa99bb670d17fd8a5df476c85bc96ef9e4886e622d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page