Skip to main content

Aims to simplify and help with commonly used functions in the azure cloud data areas.

Project description

Binary Rain Helper Toolkit: Azure Cloud

binaryrain_helper_cloud_azure is a python package that aims to simplify and help with common functions in Azure Cloud areas. It builds on top of the azure library and provides additional functionality to make working with Azure Cloud easier, reduces boilerplate code and provides clear error messages.

Key Functions

  • return_http_response(): handles returning HTTP responses with status codes and messages:

      from binaryrain_helper_cloud_azure import return_http_response
      import json
    
      # Return a 200 OK response
      return return_http_response('Success Message', 200)
    
      # Return json data with a 201 Created response
      return return_http_response(json.dumps({'key': 'value'}), 201)
    
      # Return a 404 Not Found response
      return return_http_response('Resource not found', 404)
    
      # Return a 500 Internal Server Error response
      return return_http_response('Internal Server Error', 500)
    
  • read_blob_data(): provides a simplified way to read data from Azure Blob Storage:

      from binaryrain_helper_cloud_azure import read_blob_data
      from binaryrain_helper_data_processing import FileFormat
    
      # Read a Parquet file from blob storage
      df = read_blob_data(
          blob_account="your_account",
          container_name="your_container",
          blob_name="data.parquet"
      )
    
      # Read CSV with custom format
      df = read_blob_data(
          blob_account="your_account",
          container_name="your_container",
          blob_name="data.csv",
          file_format=FileFormat.CSV
      )
    
  • upload_blob_data(): handles uploading dataframes to blob storage:

        from binaryrain_helper_cloud_azure import upload_blob_data, FileFormat
    
        # Upload dataframe as Parquet
        upload_blob_data(
            blob_account="your_account",
            container_name="your_container",
            blob_name="data.parquet",
            df=your_dataframe
        )
    
        # Upload with compression options
        upload_blob_data(
            blob_account="your_account",
            container_name="your_container",
            blob_name="data.parquet",
            df=your_dataframe,
            file_format_options={'compression': 'snappy'}
        )
    

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

binaryrain_helper_cloud_azure-0.0.2.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

binaryrain_helper_cloud_azure-0.0.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file binaryrain_helper_cloud_azure-0.0.2.tar.gz.

File metadata

File hashes

Hashes for binaryrain_helper_cloud_azure-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ad4a1be424a0638a9e5be70dd8a6d2c314a8be22371882afd4579503cd1503b0
MD5 6e3c0e368dfdd555e1fe72a49b4e4626
BLAKE2b-256 cf6cf9fd0d11ce31ba5fbff6374590acf87ab80680d5deaeb0159e02d4a050f1

See more details on using hashes here.

File details

Details for the file binaryrain_helper_cloud_azure-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for binaryrain_helper_cloud_azure-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 922948cb29231245c8ef86de04094c630dbc277d2f6ac219fbf3f5465d6a7bb9
MD5 222eb4083120b3b8e11c738b19fa5668
BLAKE2b-256 85d884c598edef549ac2f403dbbd98ef817b45247d1c876336bbef7f7148bb14

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