title: cx_Oracle and the data source paradigm
body: <p>There is a Java paradigm for database access implemented in the Java <code>DataSource</code>. This object create a useful abstraction around the creation of database connections. The <code>DataSource</code> object keeps database configuration, but will only create database connections on request. This is allows you to keep all database configuration and initialization code in one place, and makes it easy to change database implementation, or use a mock database for testing.</p>
  
  <p>I currently working on a Python project which uses cx_Oracle.  In cx_Oracle, one gets a connection directly from the module:</p>
  
  <pre><code>import cx_Oracle as dbapi
  connection = dbapi.connect(connection_string)
  # At this point I am assuming that a real connection has been made to the database.
  # Is this true?
  </code></pre>
  
  <p>I am trying to find a parallel to the <code>DataSource</code> in cx_Oracle. I can easily create this by creating a new class and wrapping cx_Oracle, but I was wondering if this is the right way to do it in Python.</p>