SQLAlchemy's create_engine()
takes an argument connect_args
which is a dictionary that will be passed to connect()
of the underlying DBAPI (see Custom DBAPI connect()
arguments). sqlite3.connect()
accepts timeout
argument, so this should work:
create_engine('sqlite:///some.db', connect_args={'timeout': 15})