hub/usage/usage_feeders/de_usage_parameters.py

16 lines
482 B
Python
Raw Normal View History

import xmltodict
from pathlib import Path
from usage.usage_feeders.helpers.us_function_to_usage import UsFunctionToUsage
class DeUsageParameters:
def __init__(self, city_objects):
self._city_objects = city_objects
# load US Library
path = str(Path.cwd() / 'data/usage/de_library.xml')
with open(path) as xml:
self._library = xmltodict.parse(xml.read())
for city_object in city_objects:
UsFunctionToUsage.function_to_usage(city_object.function)