{ "info": { "author": "Pietro Battiston", "author_email": "me@pietrobattiston.it", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Networking" ], "description": "====== What is jsaone? ======\n\nThis is a tiny wrapper around the json module in the Python standard library, allowing to read a json file incrementally.\n\nThis can be useful for\n * parsing json streams without waiting for the end of the transmission,\n * parsing very big json objects without wasting RAM for the json representation itself.\n\nIt is an alternative to [[https://pypi.python.org/pypi/ijson/|ijson]] (written when I did not know ijson existed, but in the end more efficient).\n\n=== Efficiency ===\n\nNo extensive tests were made (if you make them, let me know), but here are the\nresults (in seconds) obtained in opening a local file with 384650 objects,\ntotalling 174 MB:\n\n^ Parser ^ Iteration 1 ^ Iteration 2 ^\n| standard (non-incremental) json | 9.511 | 9.273 |\n| cythonized jsaone | 19.055 | 18.956 |\n| ijson (with yajl2 backend) | 62.250 | 64.538 |\n| pure python jsaone | 421.641 | 421.821 |\n\n\nThose results were obtained with the script \"**tests/json_load_test.py**\".\n\nClearly those numbers are affected by the speed of the CPU and of the medium/stream.\nIn particular, since the test was made on a file from a local hard disk, the\nbottleneck was clearly the CPU, and hence it is disadvantageous for incremental\nparsers (including jsaone). If the bottleneck is given by the medium/stream,\njsaone should even outperform the standard json, which will start processing\nonly after the entire stream is received. \n\n=== Why \"jsaone\" ===\n\nBecause it sounds similar to \"json\"... but the Sa\u00f4ne is a (large) stream.\n\n=== Dependencies ===\n\n\n * [[http://pypi.python.org/pypi/simplejson/|simplejson]] (Python 2.5 only)\n * for speedup: [[http://cython.org|cython]] (at build time)\n\n=== Installing ===\n\n - If you use Debian or a derivative (such as Ubuntu or Mint), you can simply use the packages provided above.\n - **jsaone** is on pypi, so you can install it with //pip install jsaone//\n - you can extract/clone the git repo, then move in the \"jsaone\" folder and give the command\n\n python3 setup.py build_ext --inplace\n\n(replace \"**python3**\" with \"**python**\" if you are using Python 2).\n\n\n=== Usage ===\n\n\n import jsaone\n with open('/path/to/my/file.json') as f:\n gen = jsaone.load(f)\n for key, val in gen:\n ...\n\n=== Development ===\n\nYou can browse the git repo [[http://www.pietrobattiston.it/gitweb?p=jsaone.git|here]] or clone with\n git clone git://pietrobattiston.it/jsaone\n\nFor bugs and enhancements, just write me - - ideally pointing to a git branch solving the issue/providing an enhancement.\n\nJsaone should be able to parse any compliant json string... so if you find one on which it fails, please let me know!\n\n=== License ===\n\nReleased under the GPL 3. Feel free to contact me if this is a problem for you (and GPL 2 is not).", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pietrobattiston.it/jsaone", "keywords": "", "license": "GPL", "maintainer": "", "maintainer_email": "", "name": "jsaone", "package_url": "https://pypi.org/project/jsaone/", "platform": "", "project_url": "https://pypi.org/project/jsaone/", "project_urls": { "Homepage": "http://pietrobattiston.it/jsaone" }, "release_url": "https://pypi.org/project/jsaone/0.2/", "requires_dist": null, "requires_python": "", "summary": "Incremental JSON parser", "version": "0.2" }, "last_serial": 2478548, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "2260c402ec95cb142cf38f6b116f1f62", "sha256": "2581b05b1bd01171c13d10f5900ac8765f77a7242570a1d3424effa0715cd150" }, "downloads": -1, "filename": "jsaone-0.1.tar.gz", "has_sig": false, "md5_digest": "2260c402ec95cb142cf38f6b116f1f62", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36258, "upload_time": "2014-05-12T18:12:30", "url": "https://files.pythonhosted.org/packages/cb/af/17badc6824dc68cdeee57c4a795133cdbb445150d4b759530ecad41c4c5a/jsaone-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "289f45c62c5cbf6ca6f1c3085ea3a3a3", "sha256": "91f72021812adb66bc7bef1782623466faea69eba0e313c2016ec2c88136cb57" }, "downloads": -1, "filename": "jsaone-0.2.tar.gz", "has_sig": false, "md5_digest": "289f45c62c5cbf6ca6f1c3085ea3a3a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41610, "upload_time": "2016-11-23T11:54:00", "url": "https://files.pythonhosted.org/packages/01/fe/00bf9d0e00e922967cea5eb87bfe73206472543711d59beb723fde94a76f/jsaone-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "289f45c62c5cbf6ca6f1c3085ea3a3a3", "sha256": "91f72021812adb66bc7bef1782623466faea69eba0e313c2016ec2c88136cb57" }, "downloads": -1, "filename": "jsaone-0.2.tar.gz", "has_sig": false, "md5_digest": "289f45c62c5cbf6ca6f1c3085ea3a3a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41610, "upload_time": "2016-11-23T11:54:00", "url": "https://files.pythonhosted.org/packages/01/fe/00bf9d0e00e922967cea5eb87bfe73206472543711d59beb723fde94a76f/jsaone-0.2.tar.gz" } ] }