A robust collection of useful scripts
Project description
OmniPack
A collection of commonly used Python scripts in work.
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
Release history Release notifications | RSS feed
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)
Built Distribution
omnipack-0.0.2-py3-none-any.whl
(17.0 kB
view hashes)