from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
from sqlalchemy import Column, String, Integer
from sqlalchemy.pool import SingletonThreadPool
< p>
service_engine = create_engine(
'sqlite:///{}'.format(os.path.join(settings.BASE_DIR,'test.db')),
poolclass=SingletonThreadPool,
connect_args={'check_same_thread': False}
)