sensai-utils

1.6.0 · active · verified Wed Apr 15

sensai-utils is a Python library providing general-purpose utilities extracted from the larger sensAI project. It allows users to leverage various helper functions and classes (e.g., for caching, logging, data structures) without incurring the additional dependencies of the full sensAI library. The current version is 1.6.0, with minor version releases occurring regularly.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates configuring the logging utility from `sensai.utils.logging`. It sets up a basic logger to write informational messages to a file.

from sensai.utils.logging import configure
import logging
import os

# Configure a basic logger for demonstration
log_file_path = os.path.join(os.getcwd(), 'sensai_utils_quickstart.log')
configure(log_file_path=log_file_path, verbosity=logging.INFO)

logger = logging.getLogger(__name__)
logger.info('sensai-utils logging configured successfully!')

print(f"Log messages written to: {log_file_path}")

view raw JSON →