{ "info": { "author": "Laurent Peuch", "author_email": "cortex@worlddomination.be", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "Introduction\n============\n\nast2json is a small module that will convert any python AST node into its ast\nrepresentation formated in a JSON compatible python representation (list and\ndicts containing string, ints and null).\n\nInstallation\n============\n\n::\n\n pip install ast2json\n # or to have lastest version\n pip install git+git://github.com/Psycojoker/ast2json.git\n\nUsage\n=====\n\n::\n\n >>> import json\n >>> from ast import parse\n >>> from ast2json import ast2json\n\n >>> ast = ast2json(parse(open('some_python_source_file.py').read()))\n >>> print json.dumps(ast, indent=4)\n\nIf you are lazy, \"str2json\" will apply the \"parse\" method of ast on a string for you, so you'll be able to write:\n\n::\n\n >>> str2json(open('some_python_source_file.py').read())\n\nExample\n=======\n\nThis is the result of converting 'print \"Hello World!\"' (and applying json.dumps on the result).\n\n::\n\n {\n \"body\": [\n {\n \"_type\": \"Print\", \n \"nl\": true, \n \"col_offset\": 0, \n \"dest\": null, \n \"values\": [\n {\n \"s\": \"Hello World!\", \n \"_type\": \"Str\", \n \"lineno\": 1, \n \"col_offset\": 6\n }\n ], \n \"lineno\": 1\n }\n ], \n \"_type\": \"Module\"\n }\n\n\nChangelog\n=========\n\n0.2.1 (2016-11-13)\n----------------\n\n* fix broken pip installation by @abolger\n\n0.2 (2016-09-03)\n----------------\n\n* python 3 support and some unit testing by Juncheol Cho @zironycho\n\nLicence\n=======\n\nBSD\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/Psycojoker/ast2json", "keywords": "ast", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "ast2json", "package_url": "https://pypi.org/project/ast2json/", "platform": "", "project_url": "https://pypi.org/project/ast2json/", "project_urls": { "Homepage": "https://github.com/Psycojoker/ast2json" }, "release_url": "https://pypi.org/project/ast2json/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "convert a python source code into json-dumpable data (dict and lists with strings, ints, ...)", "version": "0.2.1" }, "last_serial": 2457255, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "5ebbe2476e3ab5d5c93fede6efa7cad2", "sha256": "141eab6edb072e553f155ded0af848595d238dc31a391483be810498f43c8758" }, "downloads": -1, "filename": "ast2json-0.1.tar.gz", "has_sig": false, "md5_digest": "5ebbe2476e3ab5d5c93fede6efa7cad2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2811, "upload_time": "2013-03-03T07:30:36", "url": "https://files.pythonhosted.org/packages/9a/3b/8e5b54b1116dc324ca5dca38808e6554de452df141046a12faa00e198423/ast2json-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "8e5fd425af2bb7e534bcf60134bb4ec2", "sha256": "08ef66ee110142475d02090c1009f3be0ea06287dfae5826315ff81115795630" }, "downloads": -1, "filename": "ast2json-0.2-py2.7.egg", "has_sig": false, "md5_digest": "8e5fd425af2bb7e534bcf60134bb4ec2", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 1623, "upload_time": "2016-09-04T12:59:38", "url": "https://files.pythonhosted.org/packages/b0/a8/c57020bd5e1beb29160fdaceaaf08f4d8edc89052849e0b71fe72e5b1d6b/ast2json-0.2-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "657eeac45e112896b9e8dffb85f7afa4", "sha256": "5d2271b8ab761de6efee3a8842d208bd5fb3b309188e3894904a4bcedf71e546" }, "downloads": -1, "filename": "ast2json-0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "657eeac45e112896b9e8dffb85f7afa4", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 3103, "upload_time": "2016-09-04T12:59:36", "url": "https://files.pythonhosted.org/packages/94/ac/02fbecdace1b31343802bd792d672ddbcfd09c93ba22328a64be0ffac1e5/ast2json-0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e307adf0b49732a3c3a38ac10e67d69c", "sha256": "25f1f8af5119b013e435c256997b10db64653125ad9fc87bfc1c345a61bab5b2" }, "downloads": -1, "filename": "ast2json-0.2.tar.gz", "has_sig": false, "md5_digest": "e307adf0b49732a3c3a38ac10e67d69c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1995, "upload_time": "2016-09-04T12:59:33", "url": "https://files.pythonhosted.org/packages/d6/5e/e774b19df00ba023e277213eefe60d257e25586032555e0d82c5fc997721/ast2json-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "30fd6e27759b188633a9ca675b2f3197", "sha256": "75f7332a924d9d98a204ffc330de386adb3ae34e0b05858125fb4894a01f96a7" }, "downloads": -1, "filename": "ast2json-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "30fd6e27759b188633a9ca675b2f3197", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6488, "upload_time": "2016-11-13T02:45:02", "url": "https://files.pythonhosted.org/packages/bd/36/e169b23043c43ee73b7604932c66cf9afd804a75b7fc2c32509a7ab23e3b/ast2json-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "277264e5db93c15ba9f2bbf162def3cd", "sha256": "cabb4478b5155b8a38be6f45be845c652053db2b4c46768bd0832a9cf87fd6b2" }, "downloads": -1, "filename": "ast2json-0.2.1.tar.gz", "has_sig": false, "md5_digest": "277264e5db93c15ba9f2bbf162def3cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4220, "upload_time": "2016-11-13T02:44:59", "url": "https://files.pythonhosted.org/packages/a1/77/d91675490861bac64913a8d435506e780225fd4a147b300a5ba158aed4b6/ast2json-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "30fd6e27759b188633a9ca675b2f3197", "sha256": "75f7332a924d9d98a204ffc330de386adb3ae34e0b05858125fb4894a01f96a7" }, "downloads": -1, "filename": "ast2json-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "30fd6e27759b188633a9ca675b2f3197", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6488, "upload_time": "2016-11-13T02:45:02", "url": "https://files.pythonhosted.org/packages/bd/36/e169b23043c43ee73b7604932c66cf9afd804a75b7fc2c32509a7ab23e3b/ast2json-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "277264e5db93c15ba9f2bbf162def3cd", "sha256": "cabb4478b5155b8a38be6f45be845c652053db2b4c46768bd0832a9cf87fd6b2" }, "downloads": -1, "filename": "ast2json-0.2.1.tar.gz", "has_sig": false, "md5_digest": "277264e5db93c15ba9f2bbf162def3cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4220, "upload_time": "2016-11-13T02:44:59", "url": "https://files.pythonhosted.org/packages/a1/77/d91675490861bac64913a8d435506e780225fd4a147b300a5ba158aed4b6/ast2json-0.2.1.tar.gz" } ] }