{ "info": { "author": "Steven S.L. Xie", "author_email": "stevenslxie@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Tinyble\n=======\n\nIntroduction\n------------\nTinyble is a super lightweight database inheriting `TinyDB`_. It is a document-oriented NoSQL but can also be used as a SQL database. It is most suitable for small applications where MongoDB is too way overkill.\nThe features are:\n\n.. _TinyDB: https://github.com/msiemens/tinydb\n\n- Written in pure Python and works well with most Python versions\n- Very small, stored in JSON format and requires no external server\n- Different from TinyDB, flexible auto-paging is provided to enable fast write-in and read-out\n- Combine in-memory caching with disk storage to trade-off speed and reliability\n\nDifference from TinyDB\n----------------------\nTinyDB stores each table in a single JSON file. For every IO operation, the JSON file will be wholly read and rewritten. As the file size gets larger or when there are many write-in operations, the speed can be dramatically slow.\n\nTinyble uses a separate thread to manage all the write/update operations. Specifically, all newly-updated data will first be stored in memory and an internal timer expires, they will be batch-written in the JSON file.\n\nThis reduces the number of IO operations. Moreover, a limit on the JSON file size is imposed when the size exceeds the limit, a new JSON file is created. This limits the volume of each read operation.\n\nThe internal timer and the file size can be set by users.\n\n\nVersion\n-------\nThe latest version is v0.1.4. The current version is still on experimental status. Please use it with caution. Please contact me if you find any bugs/problems.\n\nv0.1.4(07.03.2015)\n^^^^^^^^^^^^^^^^^^\n- added the close() function\n- added the projection (partial search) function\n- added the rst file\n\n\nv0.1.3(04.03.2015)\n^^^^^^^^^^^^^^^^^^\n- fixed the print bug\n- fixed the 'get' method bug\n\nHow to install\n--------------\nThe easiest way to install is to use\n::\n\n (sudo) pip install tinyble\n\n\nin the command line tool.\n\nWorking with Django\n-------------------\nA very simple and ugly example showing the use of Tinyble with Django can be found in `Tinyble with Django`_\n\n.. _Tinyble with Django: https://github.com/StevenSLXie/django_with_tinyble\n\nExample\n-------\n\nCreate a new database and a new collection\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n::\n\n db = Tinyble('data')\n collection = db.collection('example')\n\nInsert some data\n^^^^^^^^^^^^^^^^\n::\n\n col = db.collection('example')\n\n col.insert({'type': 'apple', 'number': 1})\n col.insert({'type': 'pineapple', 'number': 2})\n col.insert({'type': 'blueberry', 'number': 3})\n\nUpdate some data\n^^^^^^^^^^^^^^^^\n::\n\n col.update({'number':10}, cond= where('type')=='pineapple')\n\n\n\nDelete some data\n^^^^^^^^^^^^^^^^\n::\n\n col.remove(eids=[3])\n col.remove(cond=where('number')<4)\n\n\nOther usages are very similar to TinyDB.\n\n\nSet the parameters\n^^^^^^^^^^^^^^^^^^\n::\n\n col.setting(file_size=100, query_cache_size=10, write_freq=5)\n\n\nThe above setting means each JSON file is limited to 100 entries and the database will store the latest 10 query results in memory and write-to-disk frequency is 5s.\n\n\nSelect some data\n^^^^^^^^^^^^^^^^\n::\n\n col.search(where('number')>2)\n\nSelect part of data in a document\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n::\n\n col.search(where('type')!= 'pineapple', ['number'])\n\nThis will only show the 'number' key, not the whole dictionary.", "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/StevenSLXie/tinyble", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "tinyble", "package_url": "https://pypi.org/project/tinyble/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tinyble/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/StevenSLXie/tinyble" }, "release_url": "https://pypi.org/project/tinyble/0.1.4.5/", "requires_dist": null, "requires_python": null, "summary": "A tiny NoSQL database with in-memory caching", "version": "0.1.4.5" }, "last_serial": 1452083, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "f9de843cd08ba0ac4e31c024bf1d8492", "sha256": "010e30dbc7179a42787d39414741af121aa4bd0e15b09d35c86e2a2ed634abf4" }, "downloads": -1, "filename": "tinyble-0.1.tar.gz", "has_sig": false, "md5_digest": "f9de843cd08ba0ac4e31c024bf1d8492", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7687, "upload_time": "2015-03-01T13:17:10", "url": "https://files.pythonhosted.org/packages/33/5f/fe505a1dcf0755968023a0a66cc12a25b6708b439cb7952bde1137a8ec4d/tinyble-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "3c380c102656201c48a88bd93f354de0", "sha256": "6a40862c75e355f601fbbf53bfb76611cfa5ce201d13b76e4542e7be3c2bea88" }, "downloads": -1, "filename": "tinyble-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3c380c102656201c48a88bd93f354de0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7746, "upload_time": "2015-03-03T12:13:08", "url": "https://files.pythonhosted.org/packages/aa/f1/6414cf4df0970bb4d3649bf7efb8d29e3086a6de2bf848aa94191be0ae19/tinyble-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "6c7ee2a7e483236589731ed75030d8a1", "sha256": "aa453dcc7bf570c551f8ef16ac7a46a909f6894361f1d1c64cd7feaf7a15880c" }, "downloads": -1, "filename": "tinyble-0.1.2.tar.gz", "has_sig": false, "md5_digest": "6c7ee2a7e483236589731ed75030d8a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7747, "upload_time": "2015-03-04T12:48:05", "url": "https://files.pythonhosted.org/packages/57/6d/3910510211a27bc636ece6232be93d84857e5ddc4b7e2994845a828c6485/tinyble-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "12105cf8eb26c66d3b9a6697a4cd80d1", "sha256": "9f5510a29eac6599579aaf69ea5daab8d00876aae04157e5514178d3cca49117" }, "downloads": -1, "filename": "tinyble-0.1.3.tar.gz", "has_sig": false, "md5_digest": "12105cf8eb26c66d3b9a6697a4cd80d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7750, "upload_time": "2015-03-04T14:43:32", "url": "https://files.pythonhosted.org/packages/50/30/4b5d9cd8760cf7ef1df343962c0bccd5271e23143389ed7a3e06279d6879/tinyble-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "907a3e2a131799087fb55e71baa00658", "sha256": "3556acd1d4b54e870dbf51f3c451e0bdce89720881fbffe7b9998b99a25681d1" }, "downloads": -1, "filename": "tinyble-0.1.4.tar.gz", "has_sig": false, "md5_digest": "907a3e2a131799087fb55e71baa00658", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7823, "upload_time": "2015-03-07T03:08:59", "url": "https://files.pythonhosted.org/packages/e2/3a/067e80823d705727b71997fd3d1213b7d6ee46b1c7f2e643a27dde92cbdf/tinyble-0.1.4.tar.gz" } ], "0.1.4.1": [ { "comment_text": "", "digests": { "md5": "c6a0091d728c7e21094e10c789c74227", "sha256": "ff080b81f16b871756b4d256ccf51fa3a762f04b47fdc8319b3bca85ca528147" }, "downloads": -1, "filename": "tinyble-0.1.4.1.tar.gz", "has_sig": false, "md5_digest": "c6a0091d728c7e21094e10c789c74227", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9045, "upload_time": "2015-03-07T03:19:26", "url": "https://files.pythonhosted.org/packages/77/04/087fd8cb7c36c6ea261aa7a6aa24dbb230f728b20bed3e96931cc2f3e160/tinyble-0.1.4.1.tar.gz" } ], "0.1.4.2": [ { "comment_text": "", "digests": { "md5": "6c69545d992f59afa63a46ede4702290", "sha256": "4373e8c1f625e7e615ad166b3d10bb5022b002564bd2a305010f3da937bc38bc" }, "downloads": -1, "filename": "tinyble-0.1.4.2.tar.gz", "has_sig": false, "md5_digest": "6c69545d992f59afa63a46ede4702290", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9231, "upload_time": "2015-03-07T14:43:58", "url": "https://files.pythonhosted.org/packages/74/aa/a79e0d4a017149f97c387c19e6fbb9d36ef15d76fda1413580a7c45fab4c/tinyble-0.1.4.2.tar.gz" } ], "0.1.4.3": [ { "comment_text": "", "digests": { "md5": "26e6ab8ff937956687b0b4e74e65abe6", "sha256": "ec2b65d3964393c4cf9421cf976ead83306b5726a555f039f91b4dd328c89d95" }, "downloads": -1, "filename": "tinyble-0.1.4.3.tar.gz", "has_sig": false, "md5_digest": "26e6ab8ff937956687b0b4e74e65abe6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9206, "upload_time": "2015-03-07T14:54:44", "url": "https://files.pythonhosted.org/packages/9c/d9/1b142da821cb8e54c5519f49fa114304bed199f4d13437f8a1a458c06b80/tinyble-0.1.4.3.tar.gz" } ], "0.1.4.4": [ { "comment_text": "", "digests": { "md5": "c303dd34aa1c95d2cf1a6765b6e2711b", "sha256": "c3d1ce8021a5a8d6878eb454be68757bfaa762065a415d4b3aca88d095677dce" }, "downloads": -1, "filename": "tinyble-0.1.4.4.tar.gz", "has_sig": false, "md5_digest": "c303dd34aa1c95d2cf1a6765b6e2711b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10900, "upload_time": "2015-03-07T15:06:33", "url": "https://files.pythonhosted.org/packages/76/2f/075bbeea253abcf8408f800cc6936008e707adf5164576bec9f1f82b2bcc/tinyble-0.1.4.4.tar.gz" } ], "0.1.4.5": [ { "comment_text": "", "digests": { "md5": "97f3a75da0df0178c066a898d7aebcd4", "sha256": "45ea7d34ea1eed1cb728323cd2eb2e5d79fcfd35540e072f7f35db30b57e1964" }, "downloads": -1, "filename": "tinyble-0.1.4.5.tar.gz", "has_sig": false, "md5_digest": "97f3a75da0df0178c066a898d7aebcd4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10937, "upload_time": "2015-03-07T15:15:14", "url": "https://files.pythonhosted.org/packages/c7/ba/6bf42ccafe3b517e3e1623aa213f6ceec78502aaf90a542d068807de6bd8/tinyble-0.1.4.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "97f3a75da0df0178c066a898d7aebcd4", "sha256": "45ea7d34ea1eed1cb728323cd2eb2e5d79fcfd35540e072f7f35db30b57e1964" }, "downloads": -1, "filename": "tinyble-0.1.4.5.tar.gz", "has_sig": false, "md5_digest": "97f3a75da0df0178c066a898d7aebcd4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10937, "upload_time": "2015-03-07T15:15:14", "url": "https://files.pythonhosted.org/packages/c7/ba/6bf42ccafe3b517e3e1623aa213f6ceec78502aaf90a542d068807de6bd8/tinyble-0.1.4.5.tar.gz" } ] }