code: def create_database_engine(user, password, database, host, port):
      
  
      driver = 'mysql+pymysql'
      url = URL(driver, user, password, host, port, database,
                query={'charset': 'utf8mb4'})
      return create_engine(url, poolclass=QueuePool,
                           pool_size=25, pool_pre_ping=True,
                           echo=False)
docs: Create a database engine