{ "info": { "author": "Luke Paris (Paradoxis)", "author_email": "luke@paradoxis.nl", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "# PIP Module Scanner\n[![Build Status](https://travis-ci.org/Paradoxis/PIP-Module-Scanner.svg?branch=master)](https://travis-ci.org/Paradoxis/PIP-Module-Scanner)\n[![Code Coverage](https://codecov.io/gh/Paradoxis/PIP-Module-Scanner/branch/master/graph/badge.svg)](https://codecov.io/gh/Paradoxis/PIP-Module-Scanner)\n[![PyPI version](https://badge.fury.io/py/pip-module-scanner.svg)](https://badge.fury.io/py/pip-module-scanner)\n\nScans your Python project for all installed third party pip libraries that are used and generates a requirements.txt based output.\n\n## Installation\nInstalling the scanner is easy, either clone the repository and run the script or install it via pip like so:\n\n```shell\n$ pip install pip-module-scanner\n```\n\n## Usage\nUsing the scanner is incredibly simple. Open a terminal and navigate to your project folder, run the script and watch magic happen before your eyes. Example:\n\n```shell\n$ cd ~/projects/my-awesome-project/\n$ pip-module-scanner\nfoo==1.0.0\nbar==2.1.0\nbaz==0.0.1\n``` \n\n### Specifying a custom path\nYou can specify a custom path in which you want to run the script with the `-p` or `--path` argument. Example:\n\n```shell\n$ pip-module-scanner --path ~/projects/my-awesome-project/\nfoo==1.0.0 \nbar==2.1.0\nbaz==0.0.1\n```\n\n### Writing the output to a file\nYou can write the output of the script to a file by using the `-o` or `--out` argument. Example:\n\n```shell\n$ cd ~/projects/my-awesome-project/\n$ pip-module-scanner -o requirements.txt\n$ cat requirements.txt\nfoo==1.0.0\nbar==2.1.0\nbaz==0.0.1\n```\n\n## Integrating the code in your project\nYou can easily integrate the scanner code in your own project so you can get the output of the scanner yourself or modify the class to suit your own needs. To do this, you can use it like so:\n\n```python\nfrom pip_module_scanner.scanner import Scanner\n\nscanner = Scanner()\nscanner.run()\n\n# do whatever you want with the results here\n# example:\nfor lib in scanner.libraries_found:\n print (\"Found module %s at version %s\" % (lib.key, lib.version))\n```\n\nSpecifying a path would work like so, make sure to also import the `ScannerException` as it will check if the path you specified is actually a real path:\n\n```python\nfrom pip_module_scanner.scanner import Scanner, ScannerException\n\ntry:\n scanner = Scanner(path=\"~/projects/my-awesome-project/\")\n scanner.run()\n\n # do whatever you want with the results here\n # example:\n for lib in scanner.libraries_found:\n print (\"Found module %s at version %s\" % (lib.key, lib.version))\n\nexcept ScannerException as e:\n print(\"Error: %s\" % str(e))\n```\n\nFor the one-liner junkies out there (like me) you can also get all libraries with this nifty little one-liner (I'm so considerate)\n\n```python\nfrom pip_module_scanner.scanner import Scanner\n\nlibs = Scanner().run().libraries_found # Isn't it beautiful?\n```\n\n## Class definitions\n\n### pip_module_scanner.scanner.Scanner([string path [, string output]])\n\n| Method | Argument | Type | Required | Description |\n| ------------------- | -------- | ------- | -------- | ---------------------------------------------------- |\n| \\_\\_init\\_\\_ | path | string | no | Directory to recursively scan through, defaults to current working directory. |\n| | output | string | no | Output path to write the resutlts from `output()` to |\n| run | | | | Runs the scan, output will be stored in `libraries_found` |\n| output | | | | Writes the output to the console or a path specified in the constructor |\n\n\n| Property | Type | Description |\n| ------------------- | --------------------------------------------------- | ------------ |\n| libraries_found | list | List of all found pip libraries in your project, result from `Scanner.run()`.\n\n\n## License\nMIT License\n\nCopyright (c) 2016 Luke Paris\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n", "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/Paradoxis/PIP-Module-Scanner", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pip-module-scanner", "package_url": "https://pypi.org/project/pip-module-scanner/", "platform": "", "project_url": "https://pypi.org/project/pip-module-scanner/", "project_urls": { "Homepage": "https://github.com/Paradoxis/PIP-Module-Scanner" }, "release_url": "https://pypi.org/project/pip-module-scanner/0.6/", "requires_dist": [ "twine; extra == 'dev'", "codecov; extra == 'test'", "coverage; extra == 'test'", "requests (==2.19.1); extra == 'test'", "flask (==1.0.2); extra == 'test'" ], "requires_python": ">=2.7.0", "summary": "Scans your Python project for all installed third party pip libraries and generates a requirements.txt based output.", "version": "0.6" }, "last_serial": 4272680, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "1fae88d674c6de9817687bae71dd7751", "sha256": "a3b4c3a355fd77057a86b0e34cd29d0f0be44f3c0c1f909b1b2325ceb2ef0e37" }, "downloads": -1, "filename": "pip-module-scanner-0.2.tar.gz", "has_sig": false, "md5_digest": "1fae88d674c6de9817687bae71dd7751", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3607, "upload_time": "2016-08-10T08:59:59", "url": "https://files.pythonhosted.org/packages/6f/c1/a54dd36534e23aaf0405da56c80ea369e13e9c0b572a8d6d0a8fff95b719/pip-module-scanner-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "268a1d33b07ba5bc1ffb6c01dcc88685", "sha256": "a86cf59eec7c6a7ba0e6be093a1a4ccaffee11e0af994505e1c5473a6ff61d96" }, "downloads": -1, "filename": "pip-module-scanner-0.3.tar.gz", "has_sig": false, "md5_digest": "268a1d33b07ba5bc1ffb6c01dcc88685", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2630, "upload_time": "2016-08-10T10:01:45", "url": "https://files.pythonhosted.org/packages/a5/c4/8f1c2b80ff392a681fda91a079b80da828f24c079e6683b2a3cb1fbc32b0/pip-module-scanner-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "2d82ae3569e1c55402b4b1588a76e115", "sha256": "c874f9e9b2b893844faa38c9a26a9b8f2331c38a802339b736d2f0b4a24a0f05" }, "downloads": -1, "filename": "pip-module-scanner-0.4.tar.gz", "has_sig": false, "md5_digest": "2d82ae3569e1c55402b4b1588a76e115", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4344, "upload_time": "2016-08-10T10:17:20", "url": "https://files.pythonhosted.org/packages/6a/d1/079909eb36836e1bdf7c2f87cef0d7a7cb0f6a8493525ae5782ec56ec83c/pip-module-scanner-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "62778e4ffc5eb415b3a401b1a5d724f2", "sha256": "ed5d7a7a2d928ab11eed37a19c94fcbff8ebbc341daeac15ecd74a71d8e56dfb" }, "downloads": -1, "filename": "pip-module-scanner-0.5.tar.gz", "has_sig": false, "md5_digest": "62778e4ffc5eb415b3a401b1a5d724f2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2627, "upload_time": "2016-08-10T10:18:44", "url": "https://files.pythonhosted.org/packages/61/88/d7b9b0968b9ee20ec86071b9c6e9199031aa7f58e549a0888074aca08b56/pip-module-scanner-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "fb51c30aa77b49b1e2a89816aa0262b5", "sha256": "5a3ba9a2cc159ba9e1a03c3902a31e797fc41db733018534841956d0f2f9acab" }, "downloads": -1, "filename": "pip_module_scanner-0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fb51c30aa77b49b1e2a89816aa0262b5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7.0", "size": 9127, "upload_time": "2018-09-14T14:59:11", "url": "https://files.pythonhosted.org/packages/2c/52/e38e6e7f9a8835df753e41482b2a3eba9ba002f7adc483c8d5f7620fdc19/pip_module_scanner-0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7616d87d5f4b2f9a64089201dc3bd2a1", "sha256": "dc89e32c158fdd2c4eb5753858031aa4129e46bd967f463f9f3b567afd84f24f" }, "downloads": -1, "filename": "pip-module-scanner-0.6.tar.gz", "has_sig": false, "md5_digest": "7616d87d5f4b2f9a64089201dc3bd2a1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7.0", "size": 7930, "upload_time": "2018-09-14T14:59:13", "url": "https://files.pythonhosted.org/packages/b5/5f/68278c856741278d04c923bb650a49bfe2cee1c3e48dfd1ee9da0a4ad756/pip-module-scanner-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fb51c30aa77b49b1e2a89816aa0262b5", "sha256": "5a3ba9a2cc159ba9e1a03c3902a31e797fc41db733018534841956d0f2f9acab" }, "downloads": -1, "filename": "pip_module_scanner-0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fb51c30aa77b49b1e2a89816aa0262b5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7.0", "size": 9127, "upload_time": "2018-09-14T14:59:11", "url": "https://files.pythonhosted.org/packages/2c/52/e38e6e7f9a8835df753e41482b2a3eba9ba002f7adc483c8d5f7620fdc19/pip_module_scanner-0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7616d87d5f4b2f9a64089201dc3bd2a1", "sha256": "dc89e32c158fdd2c4eb5753858031aa4129e46bd967f463f9f3b567afd84f24f" }, "downloads": -1, "filename": "pip-module-scanner-0.6.tar.gz", "has_sig": false, "md5_digest": "7616d87d5f4b2f9a64089201dc3bd2a1", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7.0", "size": 7930, "upload_time": "2018-09-14T14:59:13", "url": "https://files.pythonhosted.org/packages/b5/5f/68278c856741278d04c923bb650a49bfe2cee1c3e48dfd1ee9da0a4ad756/pip-module-scanner-0.6.tar.gz" } ] }