Skip to main content

Tool that create a graph of code to show dependencies between code entities (methods, classes and etc).

Project description

badge1 badge2 badge3

Tool that create a graph of code to show dependencies between code entities (methods, classes and etc). CodeGraph does not execute code, it is based only on lex and syntax parse, so it not need to install all your code dependencies.

Usage:

pip install codegraph

cg /path/to/your_python_code # path must be absolute

your_python_code - module with your python code

For example, if I put codegraph in my user home directory path will be:

cg /Users/myuser/codegraph/codegraph

Pass ‘-o’ flag if you want only print dependencies in console and don’t want graph visualisation

cg /path/to/your_python_code -o

If you want to change view and play with graph output - you can check ‘vizualyzer.py’ and play with matplotlib and networkX settings.

In default view - red line show dependencies between entities in different modules. Green - entities in module.

Graph visualisation Code with not used module Code there all modules linked together

TODO:

  1. Create normal readme

  2. Add tests

  3. Add possibility to work with any code based (not depend on Python language only)

  4. Work on visual part of Graph (now it is not very user friendly)

  5. Add support to variables (names) as entities

Contributing:

Open PR with improvements that you want to add

If you have any questions - write me xnuinside@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codegraph-0.0.7.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

codegraph-0.0.7-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

Details for the file codegraph-0.0.7.tar.gz.

File metadata

  • Download URL: codegraph-0.0.7.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.7.4 Darwin/18.7.0

File hashes

Hashes for codegraph-0.0.7.tar.gz
Algorithm Hash digest
SHA256 830811bf8c23ad92b3f75e3dc2a89ea9bd9d3f26145f4a6a6c4ccfef06de3878
MD5 3c90d562000019b130da9ee59d1c00df
BLAKE2b-256 12e6b3b1a1720471cfa8c2179ac1c543a008ecff72ba7b6636c654f3cab5db1f

See more details on using hashes here.

File details

Details for the file codegraph-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: codegraph-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.7.4 Darwin/18.7.0

File hashes

Hashes for codegraph-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b3cecefbd71d20be60e2738c79774e6375ee3aeb7d6888e049a374d67005545a
MD5 7eed8a16758d93b560278768d8f23c48
BLAKE2b-256 43470d1f61ee4bad30e5da9f4465ccdd71ed70586332ab423a7f577ac48de4ca

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page