Metadata-Version: 2.1
Name: ubi-config
Version: 0.1.0
Summary: a simple tool used to load UBI config
Home-page: https://github.com/release-engineering/ubi-config
Author: 
Author-email: 
License: GNU General Public License
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
Requires-Dist: six
Requires-Dist: jsonschema (==2.5.1)
Requires-Dist: ordereddict ; python_version < "2.7"
Requires-Dist: requests (<=2.18.4) ; python_version < "3"
Requires-Dist: PyYAML (<3.12) ; python_version < "3"
Requires-Dist: requests ; python_version >= "3"
Requires-Dist: PyYAML ; python_version >= "3"



A Python library for reading UBI configurations

[![Build Status](https://travis-ci.org/release-engineering/ubi-config.svg?branch=master)](https://travis-ci.org/release-engineering/ubi-config)
[![Coverage Status](https://coveralls.io/repos/github/release-engineering/ubi-config/badge.svg?branch=master)](https://coveralls.io/github/release-engineering/ubi-config?branch=master)

- [Source](https://github.com/release-engineering/ubi-config)
- [Documentation](https://release-engineering.github.io/ubi-config/)
- [PyPI](https://pypi.org/project/ubi-config)

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()`

```python
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:
```python

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:
```python
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.



