Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blob Utils #16

Merged
merged 1 commit into from
Mar 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 34 additions & 6 deletions test/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
# Blob Utils

List, Upload and Download files for Canone Unico on Azure Blob Storage.

## Prerequisites

Before to use this tool, type this command:

`az login`

---

## List

Shows the list of the files in a blob storage.
To show the list of the files in a blob storage. Default list the input container of develop.

`python3 ./blob_utils.py list`

Expand All @@ -13,16 +23,22 @@ Optional
--container_name {name of the container}
```

Example:
### Examples

`python3 ./blob_utils.py list --account-name pagopadcanoneunicosa --container_name pagopadcanoneunicosaincsvcontainer`

---

## Download

Downloads a file from a blob storage.
To download a file from a blob storage.

`python3 ./blob_utils.py download --file {name of the file in the blob storage}`

**Required**

`--file {name of the file to upload}`

Optional

```
Expand All @@ -31,16 +47,22 @@ Optional
--container_name {name of the container}
```

Example:
### Examples

`python3 ./blob_utils.py download --file filename.csv --path out --account-name pagopadcanoneunicosa --container_name pagopadcanoneunicosaincsvcontainer`

---

## Upload

Uploads a file in the blob storage. If `rows` is set it creates a CSV file with fake data first.
To upload a file in the blob storage. If `rows` is set it creates a CSV file with fake data first.

`python3 ./blob_utils.py upload --file {name of the file to upload}`

**Required**

`--file {name of the file to upload}`

Optional

```
Expand All @@ -50,6 +72,12 @@ Optional
--container_name {name of the container}
```

Example:
### Examples

- with auto generation of the file (with --rows parameter)

`python3 ./blob_utils.py upload --file filename.csv --rows 5 --path in --account-name pagopadcanoneunicosa --container_name pagopadcanoneunicosaincsvcontainer`

- to upload an existing file (without --rows parameter)

`python3 ./blob_utils.py upload --file filename.csv --path in --account-name pagopadcanoneunicosa --container_name pagopadcanoneunicosaincsvcontainer`