Skip to content
This repository has been archived by the owner on Feb 19, 2023. It is now read-only.

Latest commit

 

History

History
76 lines (42 loc) · 1.76 KB

README.rst

File metadata and controls

76 lines (42 loc) · 1.76 KB

EZedCfg

A basic configuration loading package

Documentation Status Updates

This package's primary purpose is to make it easier to change a programs default configuration by loading a custom configuration file in either YAML format or JSON Format.

It does this by performing a dictionary update on a supplied default configuration.

Installation

pip install ezedcfg

Usage

from ezedcfg import EZedCfg

default_configuration = {'item 1' : 1, 'item 2': False}
path_to_config = 'path/config.yml'

ezcfg = EZedCfg(default_configuration, path_to_config)

updated_configuration = ezcfg.load()

If you intend using a json configuration file, add json to the object arguments:

ezcfg = EZedCfg(default_configuration, path_to_config,'json')

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.