-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLogicParser.py
44 lines (36 loc) · 1.36 KB
/
LogicParser.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import yaml
def parser_yml_config_ip():
with open("config.yml", 'r') as file:
config = yaml.safe_load(file)
return config.get('ip', [])
def parser_yml_config_port():
with open("config.yml", 'r') as file:
config = yaml.safe_load(file)
return config.get('port', [])
def parser_yml_config_password():
with open("config.yml", 'r') as file:
config = yaml.safe_load(file)
return config.get('password', [])
def parser_yml_config_promo():
with open("config.yml", 'r') as file:
config = yaml.safe_load(file)
return config.get('promo', [])
def parser_yml_config_twich_price():
with open("config.yml", 'r') as file:
config = yaml.safe_load(file)
return config.get('twich', [])
def parser_yml_config_price():
with open("config.yml", 'r') as file:
config = yaml.safe_load(file)
return config.get('price', [])
def parser_yml_config_price_promo():
with open("config.yml", 'r') as file:
config = yaml.safe_load(file)
return config.get('price_promo', [])
ip = parser_yml_config_ip()
port = parser_yml_config_port()
password = parser_yml_config_password()
promo = parser_yml_config_promo()
twich_price = parser_yml_config_twich_price()
price = parser_yml_config_price()
price_promo = parser_yml_config_price_promo()