title: Python (and Django) best import practices
body: <p>Out of the various ways to import code, are there some ways that are preferable to use, compared to others? This link <a href="http://effbot.org/zone/import-confusion.htm" rel="noreferrer">http://effbot.org/zone/import-confusion.htm</a> in short
  states that</p>
  
  <pre><code>from foo.bar import MyClass
  </code></pre>
  
  <p>is not the preferred way to import MyClass under normal circumstances or unless you know what you are doing. (Rather, a better way would like:</p>
  
  <pre><code>import foo.bar as foobaralias
  </code></pre>
  
  <p>and then in the code, to access MyClass use</p>
  
  <pre><code>foobaralias.MyClass
  </code></pre>
  
  <p>)</p>
  
  <p>In short, it seems that the above-referenced link is saying it is <em>usually</em> better to import everything from a module, rather than just parts of the module.</p>
  
  <p>However, that article I linked is really old.</p>
  
  <p>I've also heard that it is better, at least in the context of Django projects, to instead only import the classes you want to use, rather than the whole module. It has been said that this form helps avoid circular import errors or at least makes the django import system less fragile. It was pointed out that Django's own code seems to prefer "from x import y" over "import x".</p>
  
  <p>Assuming the project I am working on doesn't use any special features of <code>__init__.py</code> ... (all of our <code>__init__.py</code> files are empty), what import method should I favor, and why?</p>