thebjorn / pydeps

Python Module Dependency graphs
https://pydeps.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
1.8k stars 114 forks source link

Is there a plan to support dependency graphs for Methods and/or Classes? #187

Closed noobyogi0010 closed 1 year ago

noobyogi0010 commented 1 year ago

Hello,

I really loved this library and have recently integrated it into our app. But I wondered if there's a way to generate a similar dependency graph for a particular method or class in a given file or repo.

Thanks.

thebjorn commented 1 year ago

Hi @noobyogi0010 and thank you for your interest in pydeps!

pydeps simply looks at the import-pyc codes to find the next file to process, and depending on what you're asking you need dataflow and/or deeper semantic analysis. I'm confident that byte-code parsing is not the way to go for such a problem (it's very fast, but horribly complex). I agree that it would be a very useful tool to have though ;-)