Skip to main content

A Python Library for accessing Universal Base Image configuration

Project description

A Python library for accessing Universal Base Image configuration

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 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


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-1.0.0.tar.gz (20.5 kB view details)

Uploaded Source

File details

Details for the file ubi-config-1.0.0.tar.gz.

File metadata

  • Download URL: ubi-config-1.0.0.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.6

File hashes

Hashes for ubi-config-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f420e26a78f6aba76e3a50410af33681a58dabc15c34df5669031d0d10a68fd3
MD5 18ac69a3d7543f0d1a85d018d7a0420b
BLAKE2b-256 0eb1c65528cb84488f6e8b64b09fc9706df4065f4b0844392681f0bfefa96f17

See more details on using hashes here.

Provenance

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