title: Python generalized sql database connector
body: <p>Currently, to connect to various database I use the following:</p>
  
  <pre><code># MySQL
  try:
      conn = pymssql.connect(host=self.host, port=self.port, user=self.user, password=self.password, database=self.database)
  except Exception as e:
      raise ConnectionError("MsSQL Error: %s" % e)
  
  # Oracle
  try:
      dsn_tns = cx_Oracle.makedsn(self.host, self.port, self.database)
      conn = cx_Oracle.connect(self.user, self.password, dsn_tns)
  except Exception as e:
      raise ConnectionError("Oracle Error: %s" % e)
  
  # PostgreSQL
      try:
      conn = psycopg2.connect(host=self.host, port=self.port, user=self.user, password=self.password, database=self.database)
  except Exception as e:
      raise ConnectionError("PostgreSQL Error: %s" % e)
  
  # MsSQL
  try:
      conn = pymssql.connect(host=self.host, port=self.port, user=self.user, password=self.password, database=self.database)
  except Exception as e:
      raise ConnectionError("MsSQL Error: %s" % e)
  </code></pre>
  
  <p>Is there a way in python to connect to all using the same <code>connector</code>? For example, something like:</p>
  
  <pre><code>odbc.connect(host, port, user, password, database, engine="MYSQL")
  </code></pre>