{ "info": { "author": "Andrew Shapton", "author_email": "alshapton@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Database", "Topic :: Utilities" ], "description": ".. image:: artwork/tinymplogo.png\n :scale: 100%\n :height: 150px\n \n.. image:: https://travis-ci.org/alshapton/TinyMP.svg?branch=master\n.. image:: https://snyk.io/test/github/alshapton/tinydb-msgpack/badge.svg\n.. image:: https://codecov.io/gh/alshapton/TinyMP/branch/master/graph/badge.svg\n.. image:: https://img.shields.io/badge/code%20style-pep8-orange.svg\n\n\n\nTinyMP is a storage backend for TinyDB https://github.com/msiemens/tinydb which is based around the MessagePack compressed JSON format (https://msgpack.org/index.html) \n\nSyntax :\n========\nTinyMP extends the syntax of the ``tinydb`` class using one of the optional ``kwargs`` as follows:\n\n\n.. code:: python\n class tinydb.database.TinyDB(*args, **kwargs)\n\n.. csv-table:: Values for ``**kwargs``\n :header: \"Value\",\"Effect\"\n :widths: 10,90\n\n \"``storage=MsgPackStorage``\",\"Default option, will use the ``MsgPack`` library\"\n \"``storage=MsgPackStorage,Lib='msgpack'``\",\"Will use the ``MsgPack`` library\"\n \"``storage=MsgPackStorage,Lib='umsgpack'``\",\"Will use the ``U-MsgPack`` Library\"\n\n\nExample Usage:\n==============\n\n.. code:: python\n\n from tinydb import TinyDB, Query\n from tinymp import *\n\n db = TinyDB('data.msg',storage=MsgPackStorage)\n \n def dbins():\n db.insert({'type': 'apple', 'count': 7})\n \n dbins()\n\nAs you can see, it's a simple drop-in replacement for any storage engine\nand it can be nested and cached. Don't forget, you will need to install as a minimum,\nthe ``msgpack-python`` library using ``pip install msgpack-python`` and the ``U-MsgPack``\nlibrary from https://github.com/vsergeev/u-msgpack-python in order to use that option.\n\nExample Usage using alternative MessagePack Library:\n====================================================\n\n.. code:: python\n\n from tinydb import TinyDB, Query\n from tinymp import *\n\n db = TinyDB('data.msg',storage=MsgPackStorage,Lib='umsgpack')\n \n def dbins():\n db.insert({'type': 'apple', 'count': 7})\n \n dbins()\n\nAs you can see, it's a simple drop-in replacement for any storage engine\nand it can be nested and cached.\n\nWhy would I use this?\n=====================\nLooking at the statistics below, it's apparent that compared to the \"standard\"\nJSON Storage mechanism, MessagePack isn't as quick, however, the filesizes on\ndisc are smaller - consider the table below, with 1,000 JSON documents of \nminute size - clearly, the MessagePack compressed format is smaller than\nthe JSON format. Whether you choose the default MsgPack library, which is \nmarginally slower than the U-MsgPack library (at the cost of a small increase\nin storage footprint with U-MsgPack) is dependent on your use case.\n\n.. csv-table:: Timings (seconds)\n :header: \"Format\",\"Run 1\", \"Run 2\", \"Run 3\", \"FileSize\"\n :widths: 10,30, 30, 30,10 \n\n \"JSON Write:\", 2.147,2.011,2.040,\"37.0 Kb\"\n \"MsgPack Write:\", 9.562,9.732,9.716,\"21.1 Kb\"\n \"U-MsgPack Write:\", 9.354,9.066,8.949,\"24.1 Kb\"\n\nChanges\n=======\n\n* Version 1.0.0-Beta5 - XX/XX/XXXX\n * Added PiPy compatibility \n * PEP-8 Compliant code style\n\n* Version 1.0.0-Beta4 - 11/26/2017\n * Added descriptions of benchmarking and tidied up repo\n * Further added information to README about usage\n\n* Version 1.0.0-Beta3 - 11/24/2017\n * Added support for u-msgpack-python alternative msgpack library\n\n* Version 1.0.0-Beta2 - 11/21/2017\n * Fixed Testing issues\n\n* Version 1.0.0-Beta - 11/19/2017\n * Tidied up repo ready for Beta release\n\n* Version 0.2.0 - 11/18/2017\n * Tidied up repo\n * Added initial benchmarking and example\n * Added Github Community files.\n\n* Version 0.1 - 11/13/2017\n * Initial Release.\n\nReferences:\n===========\n\n* TinyDB https://github.com/msiemens/tinydb \n* MessagePack https://msgpack.org/index.html\n* U-MsgPack https://github.com/vsergeev/u-msgpack-python", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/alshapton/TinyMP/", "keywords": "database nosql python tinydb documentdb", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "tinymp", "package_url": "https://pypi.org/project/tinymp/", "platform": "", "project_url": "https://pypi.org/project/tinymp/", "project_urls": { "Homepage": "https://github.com/alshapton/TinyMP/" }, "release_url": "https://pypi.org/project/tinymp/1.0.0-Beta5/", "requires_dist": null, "requires_python": "", "summary": "TinyMP is a MessagePack Storage extension for the TinyDB database https://github.com/msiemens/tinydb", "version": "1.0.0-Beta5" }, "last_serial": 3388823, "releases": { "1.0.0-Beta5": [ { "comment_text": "", "digests": { "md5": "966c4a38545c6f018f0590f1b2d70e2d", "sha256": "aa99efa158241cde429f5c40185507bd65b73024d2fb7539b428f03835c0ea88" }, "downloads": -1, "filename": "tinymp-1.0.0-Beta5a.tar.gz", "has_sig": false, "md5_digest": "966c4a38545c6f018f0590f1b2d70e2d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10114, "upload_time": "2017-12-04T22:11:50", "url": "https://files.pythonhosted.org/packages/18/d0/13bef8517101d91c132fc3d57792f0c02465173ee33ce01cc90f3206e881/tinymp-1.0.0-Beta5a.tar.gz" } ], "1.0.0b5": [ { "comment_text": "", "digests": { "md5": "7f2d1e9d47904d4190e8b1d3686314fd", "sha256": "98866c1f8b1901e724e24851b2ddbf058933092c8c59288ab42fe818ce08b425" }, "downloads": -1, "filename": "tinymp-1.0.0b5b.tar.gz", "has_sig": false, "md5_digest": "7f2d1e9d47904d4190e8b1d3686314fd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10120, "upload_time": "2017-12-04T22:50:26", "url": "https://files.pythonhosted.org/packages/12/16/e6ea822d474d742c35f5b30bae8e03b02fb55c574e27566b52af0a6ad8b5/tinymp-1.0.0b5b.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "966c4a38545c6f018f0590f1b2d70e2d", "sha256": "aa99efa158241cde429f5c40185507bd65b73024d2fb7539b428f03835c0ea88" }, "downloads": -1, "filename": "tinymp-1.0.0-Beta5a.tar.gz", "has_sig": false, "md5_digest": "966c4a38545c6f018f0590f1b2d70e2d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10114, "upload_time": "2017-12-04T22:11:50", "url": "https://files.pythonhosted.org/packages/18/d0/13bef8517101d91c132fc3d57792f0c02465173ee33ce01cc90f3206e881/tinymp-1.0.0-Beta5a.tar.gz" } ] }