Advertisement
germainsv

Untitled

Mar 30th, 2020
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. import yaml
  2.  
  3. class ETL:
  4.    
  5.     config_file = './confs/main.yaml'
  6.    
  7.     def __init__(self):
  8.         self.__dict__ = self.read_configs()
  9.        
  10.     def read_configs(self):
  11.         with open(self.config_file, 'r') as f:
  12.             return yaml.safe_load(f)
  13.        
  14. class Cosmic:
  15.    
  16.     def __init__(self, etl):
  17.         self.instCosmic = 'cosmic'
  18.         self.etl = etl
  19.  
  20. etl = ETL()
  21. cosmic = Cosmic(etl)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement