21 lines
722 B
Python
21 lines
722 B
Python
"""
|
|
Config
|
|
SPDX - License - Identifier: LGPL - 3.0 - or -later
|
|
Copyright © 2023 Project Peter Yefi peteryefi@gmail.com
|
|
"""
|
|
from hub.exports.db_factory import DBFactory as CityExportFactory
|
|
from hub.imports.db_factory import DBFactory
|
|
import os
|
|
|
|
|
|
class Config:
|
|
|
|
def __init__(self):
|
|
self.export_db_factory = CityExportFactory(db_name='hub_prod', app_env='PROD',
|
|
dotenv_path="{}/.env".format(os.path.expanduser('~')))
|
|
self.import_db_factory = DBFactory(db_name='hub_prod', app_env='PROD',
|
|
dotenv_path="{}/.env".format(os.path.expanduser('~')))
|
|
|
|
def get_city(self, city_id):
|
|
return self.export_db_factory.get_city(city_id)
|