A Python Library for accessing Universal Base Image configuration
Project description
A Python library for accessing Universal Base Image configuration
Installation
Install the ubi-config
package from PyPI.
pip install ubi-config
Usage Example
When there is DEFAULT_UBI_REPO
set, user can load the config by passing the config file
name to get_loader().load()
from ubiconfig import get_loader
config = get_loader().load('enterprise-linux-server-x86_64.yaml')
# config has been validated and is now a Python object with relevant properties
package_whitelist = config.packages.whitelist
print(package_whitelist)
Or, get all config files from the repo:
from ubiconfig import get_loader
configs = get_loader().load_all()
# returns a list of UbiConfig objects
Or, user can also load the config from local file:
from ubiconfig import get_loader
config = get_loader("/my/config/dir").load('enterprise-linux-server-x86_64.yaml')
License
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
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
ubi-config-2.3.0.tar.gz
(22.5 kB
view hashes)
Built Distribution
ubi_config-2.3.0-py3-none-any.whl
(25.5 kB
view hashes)
Close
Hashes for ubi_config-2.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37790d4a2588a2cabe7b97901e876a180a92083cdc235cf0c24bc88b1d768237 |
|
MD5 | 6408b0969ab15dbd9441fd94a0c6c642 |
|
BLAKE2b-256 | ece9f10fd6fb0aa5a9abc0dc2bece5b4883b153a17749fdac61f2132c1387a75 |