Skip to main content

Common Python tools and utilities for Hipages ML work

Project description

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

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

hip_data_ml_utils-1.3.7.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

hip_data_ml_utils-1.3.7-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file hip_data_ml_utils-1.3.7.tar.gz.

File metadata

  • Download URL: hip_data_ml_utils-1.3.7.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.9.20 Linux/6.5.0-1025-azure

File hashes

Hashes for hip_data_ml_utils-1.3.7.tar.gz
Algorithm Hash digest
SHA256 1ac2fdb4be8920be515cbefdcb15c297175fe6d78c3eca8ff706d4c871375fbf
MD5 17ffb5f4c382bf352ea29d66f5c4f7ef
BLAKE2b-256 81860e710e51b32df2498c8a536dd671bd2d728ae595abc180da9949b0b09d70

See more details on using hashes here.

File details

Details for the file hip_data_ml_utils-1.3.7-py3-none-any.whl.

File metadata

  • Download URL: hip_data_ml_utils-1.3.7-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.9.20 Linux/6.5.0-1025-azure

File hashes

Hashes for hip_data_ml_utils-1.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 4484ee262ae8cf5f844313a166f719af7eeb24197b4783e7522ed7050ddde7a5
MD5 594d38057674ab7ef618ed8461081265
BLAKE2b-256 6d2ff737a81bbe15665b91fa817041a9f3fb57dded6021cafc2cea8a02446516

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page