#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2023/4/4 16:04 # @Author : old tom # @File : abs_connector.py # @Project : futool-db # @Desc : 抽象层 import abc from sqlalchemy import create_engine class CommonConnector(metaclass=abc.ABCMeta): def __init__(self, db_conf: str): # 初始化 self.engine = create_engine(db_conf, pool_size=15, pool_recycle=3600) @abc.abstractmethod def get_conn(self): """ 获取连接 :return: """ pass