title: How to import the right way in python?
body: <p>I am learning python programming and I would like to have some information.<br>
  I am working on a small project, using OOP. Here is an example of the project structure:  </p>
  
  <pre><code>PROJECT_FOLDER  
      |__ main.py  
      |__ modules  
           |__ __init__.py  
           |__ Example.py  
  </code></pre>
  
  <p>To import my classes (here just one, but generally more) should I import every file one by one or create an "all" rule in the <em>__init__.py</em> file?  </p>
  
  <p>Here are my ideas:</p>
  
  <pre><code># Example.py
  class Example:
      def __init__(self):
          print('Hello from Example')
  </code></pre>
  
  <p>First Idea:</p>
  
  <pre><code># First version of __init__.py is an empty file
  </code></pre>
  
  <pre><code># First version of main.py
  from modules.Example import Example
  
  my_example = Example()
  </code></pre>
  
  <p>Or, second idea:</p>
  
  <pre><code># Second version of __init__.py
  __all__ = ['Example']
  </code></pre>
  
  <pre><code># Second version of main.py
  from modules import *
  
  my_example = Example.Example()
  </code></pre>
  
  <p>According to what I read in the documentation and here, it's better avoiding the use of <code>import *</code> because it could be confusing. But, if I need to import 56 classes, should I write 56 lines to import my classes before starting coding? And, using <code>import *</code> would force me to write <code>my_example = Example.Example()</code> which is not pretty and could be confusing too.</p>
  
  <p>To conclude, is this better to name class files with the class names (including the capitalized first letter)? I learned that it was a good practice in PHP but python seems to have other convention (snake case for example) that pylint is always happy to remind me :)</p>
  
  <p>Thanks for your answers, have a good day!</p>