A small example package
Project description
Installation
pip install manonaid_helpers
See PyPi for package index.
Requirements
Azure Storage connection string has to be set as environment variable AZURE_STORAGE_CONNECTION_STRING
or
the seperate environment variables AZURE_STORAGE_KEY
and AZURE_STORAGE_NAME
which will be used to create the connection string.
Usage
Download
1. Using the standard environment variables
Azure-batch-load automatically checks for environment variables: AZURE_STORAGE_CONNECTION_STRING
,
AZURE_STORAGE_KEY
and AZURE_STORAGE_ACCOUNT
.
So if the connection_string or storage_key + storage_account are set as environment variables,
we can leave the argument connection_string
, account_key
and account_name
empty:
from manonaid_helpers.download import Download
df = Download(
destination="../test_data",
source="cyi5",
extension=".csv",
folder="pack_test/"
).returnAsDataFrameDict()
2. Download a specific folder from a container
We can download a folder by setting the folder
argument. This works both for single
and batch
.
from manonaid_helpers.download import Download
Download(
destination="../test_data",
source='cyi5',
folder="pack_test/",
extension='.csv',
).download()
3. Download a given list of files
We can give a list of files to download with the list_files
argument.
from manonaid_helpers.download import Download
Download(
destination="../test_data",
source='cyi5',
folder="pack_test/",
extension='.csv',
list_files=["20230301_ais_accuracy.csv"],
).download()
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 manonaid_helpers-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6521722d174a9e94b65540ce0f1d0ca4740d3e28fc431194413cbffb99a5cf9f |
|
MD5 | 4e581cea46acc70f23e17829fae348d4 |
|
BLAKE2b-256 | 77a6401982fa628553ef8511a93c90b271aa4f1f87fdfab8637d15682d7a6618 |