seperated main
This commit is contained in:
15
src/config.py
Normal file
15
src/config.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import yaml
|
||||
|
||||
config_file = "src/config.yml"
|
||||
|
||||
|
||||
def get_config():
|
||||
with open(file=config_file, mode='r') as file:
|
||||
print(yaml.safe_load(file))
|
||||
return Config(yaml.safe_load(file))
|
||||
|
||||
|
||||
class Config:
|
||||
def __init__(self, data):
|
||||
self.src = data['src']
|
||||
self.dst = data['dst']
|
||||
Reference in New Issue
Block a user