PaiGram/core/template/__init__.py
2022-10-12 21:39:47 +08:00

12 lines
414 B
Python

from core.base.aiobrowser import AioBrowser
from core.service import init_service
from core.base.redisdb import RedisDB
from core.template.services import TemplateService
from core.template.cache import TemplatePreviewCache
@init_service
def create_template_service(browser: AioBrowser, redis: RedisDB):
_cache = TemplatePreviewCache(redis)
_service = TemplateService(browser, _cache)
return _service