2022-06-17 11:38:49 +00:00
|
|
|
from flask import Flask
|
|
|
|
import logging
|
|
|
|
|
2023-12-25 23:24:28 +00:00
|
|
|
from .model import Service
|
|
|
|
|
2022-06-17 11:38:49 +00:00
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
|
|
|
2023-12-25 23:24:28 +00:00
|
|
|
class LenticularServices(dict[str, Service]):
|
2022-06-17 11:38:49 +00:00
|
|
|
|
|
|
|
def init_app(self, app: Flask) -> None:
|
|
|
|
for service_name, service_config in app.config['LENTICULAR_CLOUD_SERVICES'].items():
|
|
|
|
self[service_name] = Service.from_config(service_name, service_config)
|
|
|
|
|
|
|
|
|
|
|
|
lenticular_services = LenticularServices()
|