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
What?
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.
Motivation
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.
Usage
- Set up
Panoptisch
within the identical digital atmosphere as your mission, here’s crucial!
- Negate
- 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
stdlib-dir
All work is licensed below the GNU Basic Public License Version 3.
Contributing
Feedback, contributions and concerns welcome.