Metadata-Version: 1.1
Name: jsaone
Version: 0.1
Summary: Incremental JSON parser
Home-page: http://pietrobattiston.it/jsaone
Author: Pietro Battiston
Author-email: me@pietrobattiston.it
License: GPL
Description: ====== What is jsaone? ======
        
        This is a tiny wrapper around the json module in the Python standard library, allowing to read a json file incrementally.
        
        This can be useful for
          * parsing json streams without waiting for the end of the transmission,
          * parsing very big json objects without wasting RAM for the json representation itself.
        
        It 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).
        
        === Efficiency ===
        
        No extensive tests were made (if you make them, let me know), but here are the
        results (in seconds) obtained in opening a local file with 384650 objects,
        totalling 174 MB:
        
        ^ Parser                          ^  Iteration 1 ^ Iteration 2 ^
        | standard (non-incremental) json |    9.511     |    9.273    |
        | cythonized jsaone               |   19.055     |   18.956    |
        | ijson (with yajl2 backend)      |   62.250     |   64.538    |
        | pure python jsaone              |  421.641     |  421.821    |
        
        
        Those results were obtained with the script "**tests/json_load_test.py**".
        
        Clearly those numbers are affected by the speed of the CPU and of the medium/stream.
        In general the faster the CPU (compared to the storage medium/stream), the
        faster will be the standard json compared to incremental ones (including
        jsaone).
        
        === Why "jsaone" ===
        
        Because it sounds similar to "json"... but the Saône is a (large) stream.
        
        === Dependencies ===
        
        
          * [[http://pypi.python.org/pypi/simplejson/|simplejson]] (Python 2.5 only)
          * for speedup: [[http://cython.org|cython]] (at build time)
        
        === Installing ===
        
          - If you use Debian or a derivative (such as Ubuntu or Mint), you can simply use the packages provided above.
          - **jsaone** is on pypi, so you can install it with //pip install jsaone//
          - you can extract/clone the git repo, then move in the "jsaone" folder and give the command
        
          python setup.py build_ext --inplace
        
        
        === Usage ===
        
        
          import jsaone
          with open('/path/to/my/file.json') as f:
              gen = jsaone.load(f)
              for key, val in gen:
                  ...
        
        === Development ===
        
        You can browse the git repo [[http://www.pietrobattiston.it/gitweb?p=jsaone.git|here]] or clone with
          git clone git://pietrobattiston.it/jsaone
        
        For bugs and enhancements, just write me - <me@pietrobattiston.it> - ideally pointing to a git branch solving the issue/providing an enhancement.
        
        === License ===
        
        Released under the GPL 3.
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Networking
Classifier: Topic :: Internet :: WWW/HTTP
