hack news

Present HN: Panoptisch – A recursive dependency scanner for Python projects

Panoptisch: A recursive dependency scanner for Python projects


⚠️🚨 Early stage! Might maybe presumably no longer work as anticipated! Feedback welcome! 🚨⚠️

Mediate about: Introduction Video


Panoptisch scans your Python file or module to obtain it be imports (aka dependencies) and recursively does so for all dependencies and sub-dependencies.It then generates a dependency tree in JSON for you to parse and place in force import policies.Imports are resolved by mimicing Python’s import system. It’s fully static moreover the importing of modules to obtain the set of its supply file(s).

Please NOTE:

There are known boundaries and concerns at this stage. Please be taught this sooner than using Panoptisch.
Mediate about: LIMITATIONS.md LINK.


I became no longer in a position to finding a lawful dependency scanner for Python. Panoptisch became born out of the have to accurately examine dependency usage accross a total mission.
It’s aim is to generate a JSON file that is also parsed and evaluated to utter import policies.
As an illustration, you possess truly appropriate attempting to limit os, socket, sys and importlib imports to chosen packages.


  1. Set up Panoptisch within the identical digital atmosphere as your mission, here’s crucial!
  1. Negate
A identical old bustle will most seemingly be

  • Mediate about file
    1. Lets no longer be within the dependencies of identical old library modules as we achieve an implicit have confidence in them.
      To filter them out, narrate the --show-stdlib-dir arguement to view if Panoptisch can routinely obtain to the backside of your identical old library itemizing, in most cases /usr/local/lib/python3.x on linux installations. Then you positively also can exclude it using
    If Panoptisch cannot routinely obtain to the backside of your identical old library itemizing, you would possibly well presumably obtain it your self and provide it as an argument to stdlib-dir


    All work is licensed below the GNU Basic Public License Version 3.


    Feedback, contributions and concerns welcome.

    Related Articles

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Back to top button