jonmorehouse / py-config

Utility classes for use in various projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python Config

Config Class

  • a class for managing project variables based upon bash env variables
  • recommended to be used with .export files Jon Morehouse Scripts

Sample Usage

from config import Config

# load variables from env
Config.load_from_list(["PATH", "PWD", "ENV"])

# load an exports file of the following format
# ENV=PRODUCTION
# MODULE=TEST
Config.load_from_path(".test.exports")

# load yaml/json file
Config.load_from_path("config.json")
Config.load_from_path("config.yml")

# access config
print Config.PATH 


About

Utility classes for use in various projects


Languages

Language:Python 100.0%