12 lines
270 B
Python
12 lines
270 B
Python
from tortoise import Tortoise
|
|
|
|
|
|
def get_app_connection(config: dict, app: str):
|
|
"""
|
|
get tortoise connection by app
|
|
:param config:
|
|
:param app:
|
|
:return:
|
|
"""
|
|
return Tortoise.get_connection(config.get('apps').get(app).get('default_connection')),
|