title: Python dependencies inside a package
body: <p>I know there are various discussions around this subject already, but I have a specific, slightly different question (most existing questions I have found focus on external (inter-)dependencies of other packaging, while my interest is mostly in my own direct package).</p>
  
  <p>I have found a variety of tools that help to find &amp; visualize interdependencies:</p>
  
  <ul>
  <li>pycallgraph: <a href="http://pycallgraph.slowchop.com/en/master/" rel="nofollow">http://pycallgraph.slowchop.com/en/master/</a> </li>
  <li>snakefood: <a href="http://furius.ca/snakefood/" rel="nofollow">http://furius.ca/snakefood/</a></li>
  <li>modulegraph: <a href="http://pythonhosted.org/modulegraph/" rel="nofollow">http://pythonhosted.org/modulegraph/</a></li>
  </ul>
  
  <p>The problem I have with using is that they show <em>all</em> the dependencies of all the modules, while I really would like to focus on my own internal dependencies plus the "first" external dependency per module. As an example: I use pandas &amp; scipy in many places, so I would like to see those referenced, but not the internal structure and dependencies of those packages on other stuff. You can imagine that those give a large explosion of other dependencies that are not in my control and therefore not of my direct interest.</p>
  
  <p>Pycallgraph does work, but it gives gigantic results that obfuscate the tiny bit of the total dependencies that I'm interested in. Does anyone have any pointers? Do I need to build something more simple myself or am I overlooking something?</p>
  
  <p>Thank you for help!</p>
  
  <p>Edit:</p>
  
  <p>So pycallgraph is not really handy for me as it really works by executing stuff. The problem with modulegraph is that (as said in the comment too) it creates this huge dot file (9000 lines). However (argh) it does not give dependencies on modules on the same package level. So if you have package "main" with modules "a", "b", "c" and a "main.file_import" with "x", "y", "z" it gives a dependency between "main" and "main.file_import". Which is not what i'm looking for, as i'm trying to figure out whether the actual structure should be re-factored (on module and on function/class level). I'll keep on adding things here, when I find or create a good solution for this. I had thought this to be a common issue though.</p>