Should be able to programmatically create a pegasus.conf yml/json file.
Look at python config/ini files. (configparser package)
Note:
class Conf:
def _init_(self):
self.d = dict()
def _setitem_(self, k, v):
self.d[k] = v
def _getitem_(self, k):
return self.d[k]
def _delitem_(self, k):
del self.d[k]