BRE/webapi/portal/config.py
2024-06-07 19:50:21 +03:00

13 lines
309 B
Python

'''Configuration module'''
from configparser import ConfigParser as Config
def read_config(file_name: str) -> Config:
'''Read config from a file'''
config_file = open(file_name, 'r', encoding='utf8')
config = Config()
config.read_file(config_file)
config_file.close()
return config