Skip to main content

a simple tool used to load UBI config

Project description

A Python library for reading UBI configurations

Build Status Coverage Status

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 ubi_config import get_loader

config = get_loader().load('rhel-8-for-x86_64-appstream')
# 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 ubi_config 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 ubi_config import get_loader

config = get_loader(local=True).load('/path/to/rhel-8-for-x86_64-appstream.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


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-0.1.0.tar.gz (20.0 kB view hashes)

Uploaded Source

Built Distributions

ubi_config-0.1.0-py3.6.egg (19.1 kB view hashes)

Uploaded Source

ubi_config-0.1.0-py2.py3-none-any.whl (21.4 kB view hashes)

Uploaded Python 2 Python 3

ubi_config-0.1.0-py2.7.egg (18.4 kB view hashes)

Uploaded Source

ubi_config-0.1.0-py2.6.egg (18.7 kB view hashes)

Uploaded Source

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