title: how to correctly import modules in python on lambda project
body: <p>I'm making a lambda function in python. 
  Here is the current structure of my project. </p>
  
  <pre><code>lambda/
  |-- datas/
  |   |-- d.json
  |
  |-- package_name/
  |   |-- __init__.py
  |   |-- lambda_function.py # this is using d.json
  |   |-- a.py # this is some classes used on lambda_function
  |   |-- b.py # this is some basic time functions that a.py need
  |   |-- utils.py
  |
  |-- tests/
  |   |-- __init__.py
  |   |-- test_main.py
  |-- setup.py
  |-- README
  </code></pre>
  
  <p>I have some issues with imports.</p>
  
  <pre><code># lambda_function.py files
  from a import *
  from utils import *
  
  # a.py files
  from b import *
  
  # b.py files
  from a import *
  </code></pre>
  
  <p>It's working locally, but not in aws lambda console. To make it working in aws lambda console, I need to change this :</p>
  
  <pre><code># lambda_function.py files
  from package_name.a import *
  </code></pre>
  
  <p>So my first question is : why ?</p>
  
  <p>And my second question is : If I want to import package_name/a.py in tests/tests_main.py, what should I do ? </p>
  
  <p>I tried </p>
  
  <pre><code>from a import *
  from package_name import *
  </code></pre>
  
  <p>But it doesn't work</p>
  
  <p>I'm still a little bit lost with how imports work, even after reading what internet had to say about it.
  Moreover, I'm not sure about my project files structure (but it's an other subject I guess)</p>