title: using __init__.py
body: <p>I am having difficulty understanding the usage scenarios or design goals of python's <code>__init__.py</code> files in my projects.</p>
  
  <p>Assume that I have 'model' directory (refers as a package) which contains the following files</p>
  
  <ol>
  <li><code>__init__.py</code></li>
  <li><code>meta.py</code></li>
  <li><code>solrmodel.py</code></li>
  <li><code>mongomodel.py</code></li>
  <li><code>samodel.py</code></li>
  </ol>
  
  <p>I found two ways of using <code>__init__.py</code>:</p>
  
  <ol>
  <li><p>I have common a definition which needs to be used in <code>solrmodel.py</code>, <code>mongomodel.py</code>, <code>samodel.py</code>. Can I use <code>__init__.py</code> as a base/common definition for all the *model.py classes? This means that I have to import <code>model/__init__.py</code>.</p></li>
  <li><p>Or, the <code>__init__.py</code> shall have imported definitions of solrmodel.py, mongomodel.py, samodel.py in its own and it allows the easy import of classes or function like this:</p>
  
  <pre><code># file: __init__.py
  
  from mongomodel import *
  from solrmodel import *
  from samodel import *
  </code></pre>
  
  <p>(I am aware that <code>import *</code> is not recommended and I just used it as a convention)</p></li>
  </ol>
  
  <p>I could not decide between above two scenarios. Are there more usage scenarios for <code>__init__.py</code> and can you explain the usage?</p>