pymagicc.config

pymagicc.config.lookup_defaults(item)[source]

Retrive configuration from pymagicc.config.default_config

Parameters

item (str) – Configuration to lookup (case insensitive)

Returns

Configuration

Return type

str

pymagicc.config.lookup_env(item)[source]

Retrive configuration from environment

We look for an environment variable named MAGICC_[item], where [item] is replaced by the value of item.upper().

Parameters

item (str) – Configuration to lookup

Returns

Configuration

Return type

str

class pymagicc.config.ConfigStore[source]

Bases: object

Class which, given an item, attempts to find the associated config variable.

All queries are case insensitive. If a lookup cannot find the item, None is returned. The items are looked up in the following order:

  1. user overrides (stored in .overrides)

  2. environment variables

  3. defaults