code: def _parse_connection_string(connstr):
      
      res = {}
      for item in connstr.split(';'):
          item = item.strip()
          if not item:
              continue
          key, value = item.split('=', 1)
          key = key.strip().lower().replace(' ', '_')
          value = value.strip()
          res[key] = value
      return res
docs: MSSQL style connection string parser
  
      Returns normalized dictionary of connection string parameters