text: import sqlalchemy
  import os
  
  connection_name = os.environ["DB_CONN_NAME"]
  db_name = os.environ["DB_NAME"]
  db_user = os.environ["DB_USER"]
  db_password = os.environ["DB_PASS"]
  driver_name = 'postgres+pg8000'
  query_string =  dict({"unix_sock": "/cloudsql/{}/.s.PGSQL.5432".format(connection_name)})
  
  
  
  def create_engine():
  
      return sqlalchemy.create_engine(
        sqlalchemy.engine.url.URL(
          drivername=driver_name,
          username=db_user,
          password=db_password,
          database=db_name,
          query=query_string,
        ),
        pool_size=5,
        max_overflow=2,
        pool_timeout=30,
        pool_recycle=1800
      )
  
  db = create_engine()