Skip to main content

A robust collection of useful scripts

Project description

OmniPack

A collection of commonly used Python scripts in work.

Build Status PyPI version

Installation

pip install omnipack

In-Python

OmniPack provides commonly used functions for quick programming. For example, it can load configuration from different kinds of files.

from omnipack import ConfigLoader
import os.path as osp

# load python file as configuration
py_sample_path = osp.join(BASE_DIR, 'data/fileio/sample.py')
py_config = ConfigLoader.from_file(py_sample_path)


# load json
json_sample_path = osp.join(BASE_DIR, 'data/fileio/sample.json')
json_config = ConfigLoader.from_file(json_sample_path)

# load yaml
yaml_sample_path = osp.join(BASE_DIR, 'data/fileio/sample.yaml')
yaml_config = ConfigLoader.from_file(yaml_sample_path)

# load python dictionary
dict_sample = dict(a=1, b=2)
dict_config = ConfigLoader.from_dict(dict_sample)

Command Line Interface

OmniPack provides many easy-to-use commands for convenience purposes. For example, to kill ghost processes triggered by the same command

omnipack kill_multiprocess "train.py"

Contributor

Li Shenggui

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

omnipack-0.0.2.tar.gz (8.7 kB view hashes)

Uploaded Source

Built Distribution

omnipack-0.0.2-py3-none-any.whl (17.0 kB view hashes)

Uploaded Python 3

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