Giter Club home page Giter Club logo

pyimps's Introduction

Unconfuse your Py imports

Pyimps shows you fully, exactly and immediately what you're importing.

If any dependency may present an issue(reloaded module, frozen, or module defined in code from ModuleType() for example) or not found you would see it. Each dependency colored differently so that you see if importing another module or just class, function or const variable. This saves debugging errors or helps making them hermetic especially when bundling, freezing them into applications.

Installation

pip install pyimps

Usage

Use it on a) source.py file b) any module name (main.suba.subb) in sys.path and current path

A complex project like tensorflow will give something like this

pyimps tensorflow                                                  

Screenshot

I wanted to check and control dependencies for large python codebase to bundled into an application and to my surprize I found no simple tool in Python that could it, pydeps is too hefty and more importantly it does not output to terminal, you need to do extra steps to open the graph in a separate graph reader gui.

On the bigger level the wish was to automate and hermetisize python builds completely, make it possible to forget about package env managers and any things at all that lay outside the project folder, including the interpreter - integrate it seamlesly with other languages in monorepo, which bazelbuild/rules_python started to do. That will allow remote building and cross-building of python apps easily including baking any docker images; That's however is a lot of work ahead

pyimps's People

Contributors

bedbad avatar

Stargazers

Hashem avatar Zoom.Quiet avatar Evgeny Pogrebnyak avatar Nicholas de Jong avatar Anatol Myshkin avatar Mikołaj Guz avatar Nicholas Hairs avatar Clayton Kehoe avatar  avatar

Watchers

Anatol Myshkin avatar  avatar

pyimps's Issues

Any chance I could pass in multiple files or a glob?

(First, nice work! This is fantastic! when it worked on one of my files, it was exactly what I was looking for! Thank you. )

Passing in a single .py entrypoint isn't giving me much, and passing in my internal module doesn't work (because my init.py is empty)
Any chance I could do something like: pyimps my_folder/**/*.py
Or I could use standard shell globbing perhaps to give it a whole list of files to process?
The trick of course would be that it would process each, keep track of which ones overlapped, and then merge the trees together so that it gave me a complete picture of all my imports for a given folder.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.