Skip to main content

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. Fetch as pd.DataFrame

We can use the returnAsDataFrameDict() method to fetch one or multiple blobs as DataFrames

If we fetch only one blob it is returned as a DataFrame

While fetching multiple blobs the return object is a dictonary of DataFrames with the blob name(with the extension) as the key.

For all blobs that contain columns with names containing "date" or "time" are converted to datetime with format="%Y-%m-%dT%H:%M:%S"

from manonaid_helpers.download import Download

df = Download(
    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.

from manonaid_helpers.download import Download

Download(
   source='cyi5',
   folder="pack_test/",
   extension='.csv',
).returnAsDataFrameDict()

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(
   source='cyi5',
   folder="pack_test/",
   extension='.csv',
   list_files=["20230301_ais_accuracy.csv"],
).returnAsDataFrameDict()

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

manonaid_helpers-0.1.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

manonaid_helpers-0.1.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file manonaid_helpers-0.1.1.tar.gz.

File metadata

  • Download URL: manonaid_helpers-0.1.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.8

File hashes

Hashes for manonaid_helpers-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a86a669c7da4657d14511f42811540a45502416627f99ff886c191ddf07dd924
MD5 8f8df30fb88301bd36c42b43f9fe5350
BLAKE2b-256 1c5074b2acc17038188b764d6504621ed3a1d4ba9762938070598de96553c2ef

See more details on using hashes here.

File details

Details for the file manonaid_helpers-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for manonaid_helpers-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 15cd02693a384a3a043d00a1be422fda3216a007f0c43b4ea867e4b4dcd012e1
MD5 47642f77d5c60094377b819fdf79847e
BLAKE2b-256 9a64e79a1f9cb25367b41b5f43b8be2d31fa7c30e56f940ec3e06814da151eb1

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