Skip to main content

Link to data-ml-utils in hipages Developer Portal, Component: data-ml-utils Entity owner badge, owner: data-platform

data-ml-utils

A utility python package that covers the common libraries we use

Installation

This is an open source library hosted on pypi. Run the following command to install the library.

pip install hip-data-ml-utils --upgrade

Documentation

Head over to https://hip-data-ml-utils.readthedocs.io/en/latest/index.html# to read our library documentation

Feature

Pyathena client initialisation

Almost one liner

import os
from hip_data_ml_utils.pyathena_client.client import PyAthenaClient

os.environ["AWS_ACCESS_KEY_ID"] = "xxx"
os.environ["AWS_SECRET_ACCESS_KEY"] = "xxx" # pragma: allowlist secret
os.environ["S3_BUCKET"] = "xxx"

pyathena_client = PyAthenaClient()

Pyathena client initialisation

Pyathena query

Almost one liner

query = """
    SELECT
        *
    FROM
        dev.example_pyathena_client_table
    LIMIT 10
"""

df_raw = pyathena_client.query_as_pandas(final_query=query)

Pyathena query

MLflow utils

Visit link

More to Come

  • You suggest, raise a feature request issue and we will review!

Tutorials

Pyathena

There is a jupyter notebook to show how to use the package utility package for pyathena: notebook

MLflow utils

There is a jupyter notebook to show how to use the package utility package for mlflow_databricks: notebook

Metadata

Release files for hip_data_ml_utils 1.4.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hip_data_ml_utils 1.4.7
File Size Uploaded
hip_data_ml_utils-1.4.7.tar.gz 17.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hip_data_ml_utils 1.4.7
File Interpreter ABI Platform
hip_data_ml_utils-1.4.7-py3-none-any.whl Python 3 none any Details

Total release size: 37.9 kB

Release files / hip_data_ml_utils-1.4.7.tar.gz

Download URL hip_data_ml_utils-1.4.7.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7835ea981df4692ca155baff673cb2dc9f4b40991204b2a63460e92c47d5ae57
BLAKE2b-256 checksum
How to use checksums
52c8e0816d9be5ee1f8b8a979ce5a9d3821e3760861e432d4dc5085f9cfc6f73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.7 Darwin/24.4.0

Release files / hip_data_ml_utils-1.4.7-py3-none-any.whl

Download URL hip_data_ml_utils-1.4.7-py3-none-any.whl
Size 20.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c1b21c83820dff05bb793b155fb41f65127ee55811fe88bd1ccc44ab52a434e
BLAKE2b-256 checksum
How to use checksums
d03abf950f417d8210ecdae0faea795779d1b5c7f07fd07ab5215e31a7515267
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.7 Darwin/24.4.0
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page