{ "info": { "author": "Waylong", "author_email": "pyeprog@foxmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Build Tools" ], "description": "# Source Hunter\nA convinient tool for analysing the dependency and calling relationship of source code.\n\nwhile coding on large project, one may sometimes face the embarrassing situation to change the very base data models \nor interfaces which may have chance to break a lot of things.\nThere are some tools like [pydeps](https://pydeps.readthedocs.io/en/latest/) which gives you clue about what other modules\nyour current module depends on(dependency graph), but it won't tell which modules will be affected if you change your\nmodule(calling graph). Source hunter is aiming at providing both calling and dependency graph at the same time.\n\n## Installation\n### Prerequisite\n1. `Graphviz` is needed for rendering\n2. The python wrapper named `graphviz`\n#### How to install Graphviz\n```bash\n# On Ubuntu/Debian\nsudo apt install graphviz\n\n# On mac\nbrew install graphviz \n\n# On Centos/Fedora\nsudo yum install graphviz\n\n```\n\n#### How to install graphviz the python package\nIf you install source_hunter using pip, you don't need to install this package manually. Otherwise, you may install\n`graphviz` by `pip install graphviz`\n\n### Install using pip:\n```bash\npip install source_hunter\n```\n \n### Install from source code:\n```bash\ngit clone https://github.com/pyeprog/source_hunter.git\ncd source_hunter\npython setup.py install\n```\n\n## Usage\n```bash\n# for help\nhunt -h\n\n# basic usage \nhunt [project_root_path] [target_module_file] [function_or_class]\n\n# example\n# search Usage of `YourModel` of `target_model.py` in current path\n# and save the output pdf file at `~/saving/dir/saving_file_name.pdf`\n# while ignoring all files with `test`, `pb2` or `migration` in its names.\ncd ~/example_project\nhunt . ./model/target_model.py YourModel \\\n --path ~/saving/dir \\\n --name saving_file_name \\\n --ignore test --ignore pb2 --ignore migration\n \n# output only to stdout\nhunt . ./model/target_model.py YourModel --stdout\n\n```\n\n## Output\nParse [flask_reddit](https://github.com/codelucas/flask_reddit)\n```bash\ncd flask_reddit\nhunt . ./flask_reddit/users/models.py User\nhunt . ./flask_reddit/users/models.py User --stdout\n\n```\n![pdf](https://github.com/pyeprog/source_hunter/blob/master/imgs/screen.png)\n\n\n```bash\ncd flask_reddit\nhunt . ./flask_reddit/users/models.py User --stdout\n\n```\n![shell](https://github.com/pyeprog/source_hunter/blob/master/imgs/shell.png)\n\n## limitation\n1. Support only python3 project (will support more language soon)\n2. Not support `import a as b` or `from a import b as c`\n\n## Change log\n- v0.40:\n - Add support for dependency graph\n - refactor python parser\n- v0.36:\n - Add logger\n - refactor parser\n- v0.35: \n - Add support for png and pdf output format\n - fix stdout mal-format\n- v0.34: \n - Add support for parsing relative import of python project\n- v0.33: \n - Add python parser and graphviz for pdf output", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pyeprog/source-hunter", "keywords": "source,dependency,calling,relationship,graph,analysis", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "source-hunter", "package_url": "https://pypi.org/project/source-hunter/", "platform": "", "project_url": "https://pypi.org/project/source-hunter/", "project_urls": { "Homepage": "https://github.com/pyeprog/source-hunter" }, "release_url": "https://pypi.org/project/source-hunter/0.40/", "requires_dist": null, "requires_python": "", "summary": "Tool for analysis of code dependency and calling relationship", "version": "0.40" }, "last_serial": 5630793, "releases": { "0.33": [ { "comment_text": "", "digests": { "md5": "2393b0acc21812a5d2cf31c87403aafa", "sha256": "9547a8eee6874657c71f25ec8040bd032499ad8f1316429f6ce4d812490803a8" }, "downloads": -1, "filename": "source_hunter-0.33.tar.gz", "has_sig": false, "md5_digest": "2393b0acc21812a5d2cf31c87403aafa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6746, "upload_time": "2019-07-28T03:33:11", "url": "https://files.pythonhosted.org/packages/50/c7/0f26ff08230a3cfb148176f407d65205584ccbb5b179e0cea20193973641/source_hunter-0.33.tar.gz" } ], "0.34": [ { "comment_text": "", "digests": { "md5": "62ffa2e030a5bfede67a72a70b2ec1f4", "sha256": "b050d673fda6d1898bfdd79e310350b2b2b5f0b4dee1cfe326433af5ed121d7e" }, "downloads": -1, "filename": "source_hunter-0.34.tar.gz", "has_sig": false, "md5_digest": "62ffa2e030a5bfede67a72a70b2ec1f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8623, "upload_time": "2019-07-28T07:57:05", "url": "https://files.pythonhosted.org/packages/b1/f7/f5e9b226751ed701bb914531c37ff9cfee4fe71ca45bd4779400d0577aa4/source_hunter-0.34.tar.gz" } ], "0.35": [ { "comment_text": "", "digests": { "md5": "d883e428f8b2e746f34bfe033d8c125b", "sha256": "46c8ab8a1ae1cb12215954dd863a91cb074b1617a269cd34e2250e58071ddb95" }, "downloads": -1, "filename": "source_hunter-0.35.tar.gz", "has_sig": false, "md5_digest": "d883e428f8b2e746f34bfe033d8c125b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9031, "upload_time": "2019-07-29T16:10:27", "url": "https://files.pythonhosted.org/packages/db/20/1c449da1cea33ca699d2189996bd96bd3286784415c77789927ea173be66/source_hunter-0.35.tar.gz" } ], "0.36": [ { "comment_text": "", "digests": { "md5": "e8f7a2627b82d0cd5aed7074f553b9b0", "sha256": "2b8f6a58251fc7adf186a9c91a75f6b9729dd6d1da415a082ea9fe6c73220f52" }, "downloads": -1, "filename": "source_hunter-0.36.tar.gz", "has_sig": false, "md5_digest": "e8f7a2627b82d0cd5aed7074f553b9b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9491, "upload_time": "2019-07-31T14:52:10", "url": "https://files.pythonhosted.org/packages/cb/8a/73d9e3817632ebc36990a16c406561b8dd4dc03193487c7150512a9f8e13/source_hunter-0.36.tar.gz" } ], "0.40": [ { "comment_text": "", "digests": { "md5": "a839952980a90e13ea83148719039dde", "sha256": "6e6ec3b068e1ef4f175111129236c738ad95fb0a7d19e7696812965ee4857d36" }, "downloads": -1, "filename": "source_hunter-0.40.tar.gz", "has_sig": false, "md5_digest": "a839952980a90e13ea83148719039dde", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11270, "upload_time": "2019-08-04T14:44:37", "url": "https://files.pythonhosted.org/packages/82/27/5780e207e98aa504006603fcbdbe2ffd5fef91471bbfad6c920a34fb1d5b/source_hunter-0.40.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a839952980a90e13ea83148719039dde", "sha256": "6e6ec3b068e1ef4f175111129236c738ad95fb0a7d19e7696812965ee4857d36" }, "downloads": -1, "filename": "source_hunter-0.40.tar.gz", "has_sig": false, "md5_digest": "a839952980a90e13ea83148719039dde", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11270, "upload_time": "2019-08-04T14:44:37", "url": "https://files.pythonhosted.org/packages/82/27/5780e207e98aa504006603fcbdbe2ffd5fef91471bbfad6c920a34fb1d5b/source_hunter-0.40.tar.gz" } ] }