{ "info": { "author": "Jez Ng", "author_email": "me@jezng.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Topic :: Utilities" ], "description": "PyEsprima\n=========\n\nA Python port of [Esprima][1], the JavaScript parser.\n\nWhy shouldn't I use it?\n-----------------------\n\nIt's pretty slow -- about two orders of magnitude slower to parse a 116k JS\nfile. The code was semi-automatically translated from JavaScript, and it does a\nlot of string appending, which is fast in JS but slow in Python.\n\nWhy should I use it?\n--------------------\n\nShelling out to a NodeJS process is likely to be a better way to use Esprima\nfrom Python. However, writing the interprocess data-marshaling code is a bit\nannoying, so if you want to do a quick hack on small amounts of data, PyEsprima\nis a good way to get down to business. The API is exactly the same, so you can\neasily swap in an interface to the external Node process later on.\n\nAlso, since the code is semi-automatically translated using [js2py][2], it's\npretty easy to keep up-to-date. You could even do it yourself. Don't fear the\nbit rot!\n\nAPI\n---\n\nPretty much the same as Esprima's / SpiderMonkey's API::\n\n >>> import pyesprima\n\n >>> print pyesprima.tokenize(\"1 + 1\")\n [{'type': 'Numeric', 'value': '1'},\n {'type': 'Punctuator', 'value': '+'},\n {'type': 'Numeric', 'value': '1'}]\n\n >>> pyesprima.parse(\"1 + 1\", loc=True)\n {'body': [{'type': 'ExpressionStatement', 'expression': {'operator': '+',\n 'loc': {'start': {'column': 0, 'line': 1}, 'end': ...\n\nInstalling\n----------\n\n pip install pyesprima\n\n[1]: http://esprima.org/\n[2]: https://github.com/int3/js2py", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/int3/pyesprima", "keywords": "javascript parser", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "pyesprima", "package_url": "https://pypi.org/project/pyesprima/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyesprima/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/int3/pyesprima" }, "release_url": "https://pypi.org/project/pyesprima/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "Python port of Esprima, the Javascript parser.", "version": "1.0.0" }, "last_serial": 805854, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "8edafcc805f1420fedf86646c4573488", "sha256": "ef072b5b81f42a1d38e581ee7f2d37c5cd85d4f54046714663f99efbc58bb840" }, "downloads": -1, "filename": "pyesprima-0.1.tar.gz", "has_sig": false, "md5_digest": "8edafcc805f1420fedf86646c4573488", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20728, "upload_time": "2013-06-30T14:48:48", "url": "https://files.pythonhosted.org/packages/e1/30/d9d2a6796d721236ee318b17901c52ddadc8507baaae17f236f71243301e/pyesprima-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "f01b32f83749eb651bf0fdc99bb1d1ad", "sha256": "7ddc0b443337fb11a5cb1e7fd4f56f054d3713635f2b7726d442e5259e44c51c" }, "downloads": -1, "filename": "pyesprima-0.1.1.tar.gz", "has_sig": false, "md5_digest": "f01b32f83749eb651bf0fdc99bb1d1ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21146, "upload_time": "2013-06-30T15:02:22", "url": "https://files.pythonhosted.org/packages/f8/58/f0c582e1c2af5ae57f74e8f7f6dd363c6e92b7c12834912adf1559674989/pyesprima-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "54d1a04d0e1580d929ed57c465f2fc8e", "sha256": "70d53d882b2729635656e904194d64832142d35a342cee784f82f793bcbd84f3" }, "downloads": -1, "filename": "pyesprima-0.1.2.tar.gz", "has_sig": false, "md5_digest": "54d1a04d0e1580d929ed57c465f2fc8e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21136, "upload_time": "2013-06-30T16:38:41", "url": "https://files.pythonhosted.org/packages/2a/e0/dd668c278c09155fd5a3fd2fed420011a10badfb73f059459cfd7b25ffa0/pyesprima-0.1.2.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "af6be6ca4bb22ecf80cd9f99475d14fa", "sha256": "cd6d9090cb3f8ba8d0b8462c116fc470f2a4f63927395b1a4baf3691bcd2be7f" }, "downloads": -1, "filename": "pyesprima-1.0.0.tar.gz", "has_sig": false, "md5_digest": "af6be6ca4bb22ecf80cd9f99475d14fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21655, "upload_time": "2013-07-02T01:23:59", "url": "https://files.pythonhosted.org/packages/9e/97/ba3d2f2397e22dd3344e81b4fa9a368e4733834dddaab3d0e16ff71ddee3/pyesprima-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "af6be6ca4bb22ecf80cd9f99475d14fa", "sha256": "cd6d9090cb3f8ba8d0b8462c116fc470f2a4f63927395b1a4baf3691bcd2be7f" }, "downloads": -1, "filename": "pyesprima-1.0.0.tar.gz", "has_sig": false, "md5_digest": "af6be6ca4bb22ecf80cd9f99475d14fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21655, "upload_time": "2013-07-02T01:23:59", "url": "https://files.pythonhosted.org/packages/9e/97/ba3d2f2397e22dd3344e81b4fa9a368e4733834dddaab3d0e16ff71ddee3/pyesprima-1.0.0.tar.gz" } ] }