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
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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
omnipack-0.0.2-py3-none-any.whl
(17.0 kB
view details)
File details
Details for the file omnipack-0.0.2.tar.gz.
File metadata
- Download URL: omnipack-0.0.2.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d370a6ecbf323f802d98cf37ac8d76eaa8128a30bd5cfa68cc6de9ec0a150f64
|
|
| MD5 |
4998adef4dac840fb4dc1765bb45872d
|
|
| BLAKE2b-256 |
654549a480c5e291420a3d0d996422c6bd950d0bd45d580f52f06477b7c76831
|
File details
Details for the file omnipack-0.0.2-py3-none-any.whl.
File metadata
- Download URL: omnipack-0.0.2-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
682e3ac58aa5c135d0cd46c32aed193324638fec153bac5bb89ded3c88b87e09
|
|
| MD5 |
16505b6a6a04e80f40a49cbc876d09f1
|
|
| BLAKE2b-256 |
2f60e5a46a56e0f07576225e436e81e03a4902df301fe66623a3acf4a37469ef
|