{ "info": { "author": "hanks", "author_email": "zhouhan315@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Copyright (c) 2017 hanks\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\nDescription: |Build Status| |Coverage Status|\n \n pystructure\n ===========\n \n A tiny tool to help reading source code with showing structure of python\n source code\n \n Why\n ===\n \n I use PyCharm as my python IDE, and sometimes I can use ``structure``\n navigation view to check code structure easily, like below:\n \n .. figure:: https://github.com/hanks/pystructure/blob/master/docs/images/pycharm-structure.jpg?raw=true\n :alt: structure\n \n structure\n \n It is useful when you read some open source codes, and for me, I like to\n write memo for code structure down in my note, but you can not copy the\n structure information to text from PyCharm, so I create this tool to\n help me easily to output text version of structure of python code.\n \n Installation\n ============\n \n ``pip install pystructure``\n \n Usage\n =====\n \n ::\n \n > pystructure\n \n Usage:\n pystructure.py SRC_PATH [-o FILE | --output=FILE]\n \n ::\n \n > pystructure pystructure.py\n \n v __VERSION__\n c PYSymbol(object)\n v GLOBAL_VAR\n v FUNCTION\n v CLASS\n v METHOD\n v ATTRIBUTE\n v PRIVATE_METHOD\n c PYStructureVisitor(object)\n v PREFIX\n v LITERAL_VALUE_PREFIX\n f __init__(self)\n f visit(self, node_list)\n f visit_Assign(self, node)\n f visit_ClassDef(self, node)\n f visit_FunctionDef(self, node)\n f visit_literal_Num(self, node)\n f visit_literal_Name(self, node)\n f visit_literal_Str(self, node)\n f visit_literal_List(self, node)\n f visit_literal_Tuple(self, node)\n f visit_literal_Dict(self, node)\n f _get_visit_result(self, node, prefix=\"PREFIX\")\n f _get_literal_value_list(self, node_list)\n f _build_func_signature(self, func_name, args_list, default_list, kwarg, vararg)\n f method_dict(self)\n c StructureParser(object)\n f __init__(self)\n f accept(self, visitor)\n f load(self, src)\n f export(self)\n f _format_structure(self, root, level=0, output=None)\n f main()\n \n Implementation\n ==============\n \n - ast - Build-in python library, to do static analytic for the source\n code\n - docopt - A great tool to help to create beautiful CLI for you\n \n Contribution\n ============\n \n 1. Fork the repository on GitHub.\n 2. Make a branch off of master and commit your changes to it.\n 3. Run the tests with tox\n \n - Either use tox to build against all supported Python versions (if you\n have them installed) or use tox -e py{version} to test against a\n specific version, e.g., tox -e py27 or tox -e py33.\n \n 4. Submit a Pull Request to the master branch on GitHub.\n \n If you\u2019d like to have a development environment for ``pystructure``, you\n should create a virtualenv and then do ``pip install -e .`` from within\n the directory.\n \n Lisence\n =======\n \n MIT Lisence\n \n .. |Build Status| image:: https://travis-ci.org/hanks/pystructure.svg?branch=master\n :target: https://travis-ci.org/hanks/pystructure\n .. |Coverage Status| image:: https://coveralls.io/repos/github/hanks/pystructure/badge.svg?branch=master\n :target: https://coveralls.io/github/hanks/pystructure?branch=master\n \nKeywords: pystructure structure ast\nPlatform: UNKNOWN\nClassifier: Topic :: Utilities\nClassifier: Development Status :: 5 - Production/Stable\nClassifier: License :: OSI Approved :: MIT License\nClassifier: Programming Language :: Python :: 2\nClassifier: Programming Language :: Python :: 2.6\nClassifier: Programming Language :: Python :: 2.7\nClassifier: Programming Language :: Python :: 3\nClassifier: Programming Language :: Python :: 3.3\nClassifier: Intended Audience :: Developers\nClassifier: Operating System :: OS Independent\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hanks/pystructure", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "pystructure", "package_url": "https://pypi.org/project/pystructure/", "platform": "", "project_url": "https://pypi.org/project/pystructure/", "project_urls": { "Homepage": "https://github.com/hanks/pystructure" }, "release_url": "https://pypi.org/project/pystructure/1.1.0/", "requires_dist": [ "docopt (>=0.6.2)" ], "requires_python": "", "summary": "a simple tool to show code structure about python source code", "version": "1.1.0" }, "last_serial": 2700308, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "a5d0623f0fb1944026170cbe003e0972", "sha256": "fee6dee42fc3041f65b91e30f683c605c4c9a835361a1c8ef56d365998321751" }, "downloads": -1, "filename": "pystructure-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a5d0623f0fb1944026170cbe003e0972", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6652, "upload_time": "2017-03-12T09:19:57", "url": "https://files.pythonhosted.org/packages/d7/7d/36bf5fc7af6ec41442f0afceac7f8c7153c4c2a1ec9441f85ba17a2943b9/pystructure-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "01ff04a3b3215f14eb4b15e60d83b6be", "sha256": "ac126c5ddb0dcf77ca4800385c2696e710fb7d368f09eea46449945b8abb861b" }, "downloads": -1, "filename": "pystructure-1.0.0.tar.gz", "has_sig": false, "md5_digest": "01ff04a3b3215f14eb4b15e60d83b6be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5060, "upload_time": "2017-03-12T09:19:59", "url": "https://files.pythonhosted.org/packages/84/52/d67c407d99d4872d188bb47e34c14f30d1fd719978396213a529c6a77e05/pystructure-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "83e3d07f5172a66f70c5aee17d0adc06", "sha256": "0a4d12eca1dc0a5c4157ecb5c18ed5f86c27d349df76c8eeea213d7987271298" }, "downloads": -1, "filename": "pystructure-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "83e3d07f5172a66f70c5aee17d0adc06", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9121, "upload_time": "2017-03-12T09:30:58", "url": "https://files.pythonhosted.org/packages/93/1a/563c2707e3f8eeca7b86da39d7e3189b666543871f7d887468154ef765ab/pystructure-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5df608fcc164ddbeca4f009e1d51e6ae", "sha256": "4a7cfa84cd634fc56f7727e44434dac014bf2231c6c3917c8ae905d897dae39e" }, "downloads": -1, "filename": "pystructure-1.1.0.tar.gz", "has_sig": false, "md5_digest": "5df608fcc164ddbeca4f009e1d51e6ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6571, "upload_time": "2017-03-12T09:31:00", "url": "https://files.pythonhosted.org/packages/80/98/e91bf580f99f11f39aece6e35392e159fd084281e6e17ca257b4eb48f43b/pystructure-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "83e3d07f5172a66f70c5aee17d0adc06", "sha256": "0a4d12eca1dc0a5c4157ecb5c18ed5f86c27d349df76c8eeea213d7987271298" }, "downloads": -1, "filename": "pystructure-1.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "83e3d07f5172a66f70c5aee17d0adc06", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9121, "upload_time": "2017-03-12T09:30:58", "url": "https://files.pythonhosted.org/packages/93/1a/563c2707e3f8eeca7b86da39d7e3189b666543871f7d887468154ef765ab/pystructure-1.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5df608fcc164ddbeca4f009e1d51e6ae", "sha256": "4a7cfa84cd634fc56f7727e44434dac014bf2231c6c3917c8ae905d897dae39e" }, "downloads": -1, "filename": "pystructure-1.1.0.tar.gz", "has_sig": false, "md5_digest": "5df608fcc164ddbeca4f009e1d51e6ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6571, "upload_time": "2017-03-12T09:31:00", "url": "https://files.pythonhosted.org/packages/80/98/e91bf580f99f11f39aece6e35392e159fd084281e6e17ca257b4eb48f43b/pystructure-1.1.0.tar.gz" } ] }