Skip to main content

Custom Helpers

A small Python utility package providing helper functions for configuration management and import utilities.

Installation

pip install custom_helpers

Features

Configuration Management

Load configuration from YAML files with omegaconf:

from custom_helpers import get_config

# Load configuration file with automatic root_dir setting
config = get_config("path/to/conf.yaml")

# Or specify a custom root directory
config = get_config("path/to/conf.yaml", root="/custom/root/path")

Python Path Utilities

Add the project root directory to the Python path:

from custom_helpers import add_root_to_pythonpath

# Add the current directory to Python path
add_root_to_pythonpath()

# Add a parent directory to Python path (go up n levels)
add_root_to_pythonpath(n_up=1)

# Get the root directory path
root_dir = add_root_to_pythonpath(return_root=True)

# Print the added directory
add_root_to_pythonpath(verbose=True)

Note: add_root_to_pythonpath is designed for script use and will raise an error if used in Jupyter/IPython environments.

Requirements

  • Python 3.10+
  • omegaconf

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

custom_helpers-0.1.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

custom_helpers-0.1.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file custom_helpers-0.1.0.tar.gz.

File metadata

  • Download URL: custom_helpers-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for custom_helpers-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e6c8e26ebfa36eb88c0db06f4d396dbe4a053ed3c39ca6d066f153dc1bf92dc8
MD5 af19d5bc51c9628e287eebab695b6955
BLAKE2b-256 59962070e4620735039c7092338ca58d870d1d5548f4ccd0586ac06b056b6332

See more details on using hashes here.

File details

Details for the file custom_helpers-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: custom_helpers-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for custom_helpers-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33537abd2bfd349e2231620ed9c7bfa540177391c8c68579f7d02e17d06e052c
MD5 30dde7c9e745c09f3795225ce52068f8
BLAKE2b-256 eaf75aef22faa60cb54e2ca7a2bea55cc6190015e28aa3f77604e4f624f2dc91

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

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