title: Python package structure supporting * imports
body: <p>I'm restructuring a python project that evolved from a small set of scripts in something bigger. I didn't think about a proper package structure before so all the scripts live in package root dir.</p>
  
  <p>I'm trying to give the project a the proper "package" structure like this:</p>
  
  <pre><code>packagename/
      docs/
      packagename/
          __init__.py
          module_data.py
          module_corrections.py
          module_plot.py
          subpackage1/
          subpackage2/
      README.md
  </code></pre>
  
  <p>I want to support importing the package as:</p>
  
  <pre><code>from packagename import *
  </code></pre>
  
  <p>The effect of the previous import should be loading a few submodules or subpackages, but also some class and function that I would like to provide without prepending the module name.</p>
  
  <p>Using <code>__all__</code> in <code>__init__.py</code> I can only load submodules or subpackages.</p>
  
  <p>How can I load, for example a <code>Data()</code> class from <code>module_data</code> and a function <code>dplot</code> from module <code>module_plot</code>?</p>
  
  <p>Furthermore, how can I import <code>module_data</code> with another short name (e.g. <code>mda</code>)?</p>
  
  <p><strong>EDIT</strong></p>
  
  <h1>Short Answer</h1>
  
  <p>All the names I want to provide must be imported or defined in <code>__init__.py</code> <strong>and</strong>
  added as string to the list <code>__all__</code>.</p>
  
  <p>Thanks to @FMc for providing an example and insight.</p>