Skip to main content

Common Python tools and utilities for ML work

Project description

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 data-ml-utils --upgrade

Documentation

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

Feature

Pyathena client initialisation

Almost one liner

import os
from 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

sm_data_ml_utils-0.1.1.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

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

sm_data_ml_utils-0.1.1-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sm_data_ml_utils-0.1.1.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.13.5 Darwin/24.5.0

File hashes

Hashes for sm_data_ml_utils-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ee47f70fd1fb291dce30cd5fa09e2c8c235d7dc09dbc62e967edde9824d65cc7
MD5 9508dd9d0e0da9f508c395e0ae1f1f9b
BLAKE2b-256 9ffcf87aad2daed4486ae2cdacda0b1b58f2a984352c27b28c1d4b80a8fd3b99

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sm_data_ml_utils-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.13.5 Darwin/24.5.0

File hashes

Hashes for sm_data_ml_utils-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b56674f662471ed1327f0902c5c58d72183f248df2724b678c6fc8c6fd05a2b
MD5 8a329f1b20078376689649dca7041c13
BLAKE2b-256 0ce990c80bbd694364e60245685db0882fb651699273d35bc2b094f6d973cdd7

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