{ "info": { "author": "Shawn Lee", "author_email": "dashawn@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.0", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Database" ], "description": "Sqlite3Worker\n=============\n\nA threadsafe sqlite worker.\n\nThis library implements a thread pool pattern with sqlite3 being the\ndesired output.\n\nsqllite3 implementation lacks the ability to safely modify the sqlite3\ndatabase with multiple threads outside of the compile time options. This\nlibrary was created to address this by bringing the responsibility of\nmanaging the threads to the python layer and is agnostic to the server\nsetup of sqlite3.\n\n|Build Status|\n\nInstall\n-------\n\nYou can use pip:\n\n.. code:: sh\n\n sudo pip install sqlite3worker\n\nYou can use setup.py:\n\n.. code:: sh\n\n sudo python setup.py install\n\nAlternatively one can use ``pip`` to install directly from the git\nrepository without having to clone first:\n\n.. code:: sh\n\n sudo pip install git+https://github.com/dashawn888/sqlite3worker#egg=sqlite3worker\n\nOne may also use ``pip`` to install on a per-user basis without\nrequiring super-user permissions:\n\n.. code:: sh\n\n pip install --user git+https://github.com/dashawn888/sqlite3worker#egg=sqlite3worker\n\nExample\n-------\n\n.. code:: python\n\n from sqlite3worker import Sqlite3Worker\n\n sql_worker = Sqlite3Worker(\"/tmp/test.sqlite\")\n sql_worker.execute(\"CREATE TABLE tester (timestamp DATETIME, uuid TEXT)\")\n sql_worker.execute(\"INSERT into tester values (?, ?)\", (\"2010-01-01 13:00:00\", \"bow\"))\n sql_worker.execute(\"INSERT into tester values (?, ?)\", (\"2011-02-02 14:14:14\", \"dog\"))\n\n results = sql_worker.execute(\"SELECT * from tester\")\n for timestamp, uuid in results:\n print(timestamp, uuid)\n\n sql_worker.close()\n\nWhen to use sqlite3worker\n-------------------------\n\nIf you have multiple threads all needing to write to a sqlite3 database\nthis library will serialize the sqlite3 write requests.\n\nWhen NOT to use sqlite3worker\n-----------------------------\n\nIf your code DOES NOT use multiple threads then you don't need to use a\nthread safe sqlite3 implementation.\n\nIf you need multiple applications to write to a sqlite3 db then\nsqlite3worker will not protect you from corrupting the data.\n\nInternals\n---------\n\nThe library creates a queue to manage multiple queries sent to the\ndatabase. Instead of directly calling the sqlite3 interface, you will\ncall the Sqlite3Worker which inserts your query into a Queue.Queue()\nobject. The queries are processed in the order that they are inserted\ninto the queue (first in, first out). In order to ensure that the\nmultiple threads are managed in the same queue, you will need to pass\nthe same Sqlite3Worker object to each thread.\n\nPython docs for sqlite3\n-----------------------\n\nhttps://docs.python.org/2/library/sqlite3.html\n\n.. |Build Status| image:: https://travis-ci.org/dashawn888/sqlite3worker.svg?branch=master\n :target: https://travis-ci.org/dashawn888/sqlite3worker\n", "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/dashawn888/sqlite3worker", "keywords": "sqlite,sqlite3,thread,multithread,multithreading", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "sqlite3worker", "package_url": "https://pypi.org/project/sqlite3worker/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/sqlite3worker/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/dashawn888/sqlite3worker" }, "release_url": "https://pypi.org/project/sqlite3worker/1.1.7/", "requires_dist": null, "requires_python": null, "summary": "('Thread safe sqlite3 interface',)", "version": "1.1.7" }, "last_serial": 2719181, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "72e943c207a356e212d49100a37f05e8", "sha256": "af872f87b4672fe28da3570b3f7e07211fc04b453ef2811154887710af50d713" }, "downloads": -1, "filename": "sqlite3worker-1.1.tar.gz", "has_sig": false, "md5_digest": "72e943c207a356e212d49100a37f05e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4545, "upload_time": "2017-03-20T00:41:59", "url": "https://files.pythonhosted.org/packages/bf/64/3127ab895cf016ea744ba6d29ad4079117c7b71329eff0f267d59c70834e/sqlite3worker-1.1.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "326e350aea6e4d247471f74b9a3c9dfe", "sha256": "8a2b3a98e2e93981fc8f2ce4c4a223d5f0f57ac40459ae8342e4fcf7ad5db184" }, "downloads": -1, "filename": "sqlite3worker-1.1.1.tar.gz", "has_sig": false, "md5_digest": "326e350aea6e4d247471f74b9a3c9dfe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5669, "upload_time": "2017-03-20T01:00:07", "url": "https://files.pythonhosted.org/packages/d2/28/703718915040581c0f94bd390a82b328f514014ed467f4ba041f42fb6dcc/sqlite3worker-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "8ec8c70b676b5c6d3176aa4818a48d21", "sha256": "81837c04d9b98928bfeea7812477774ffeeba944cd8f61feda26286ddbba2d4f" }, "downloads": -1, "filename": "sqlite3worker-1.1.2.tar.gz", "has_sig": false, "md5_digest": "8ec8c70b676b5c6d3176aa4818a48d21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5665, "upload_time": "2017-03-20T01:10:30", "url": "https://files.pythonhosted.org/packages/90/08/04f544c1f7d1b57e28e8851baee63e8da78c2601a0205601afd07aa33408/sqlite3worker-1.1.2.tar.gz" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "e2d58e416c5afb5a2b5851ca06b6cffa", "sha256": "cbec7137ac923b07a6c799b957be3afbd24310f710d61bd2aacf8ee2b9412da6" }, "downloads": -1, "filename": "sqlite3worker-1.1.3.tar.gz", "has_sig": false, "md5_digest": "e2d58e416c5afb5a2b5851ca06b6cffa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5998, "upload_time": "2017-03-20T02:42:20", "url": "https://files.pythonhosted.org/packages/19/e1/bb15e4eed6459ae08a3acbcb761be8171e056558891b0257f516b844ed1f/sqlite3worker-1.1.3.tar.gz" } ], "1.1.5": [ { "comment_text": "", "digests": { "md5": "37a4708c54d2f8e4d3c484b5cfaee385", "sha256": "19dcfa3f1bc589947d945aff3c833ce12b41fb21420778d3583c2488054ade7f" }, "downloads": -1, "filename": "sqlite3worker-1.1.5.tar.gz", "has_sig": false, "md5_digest": "37a4708c54d2f8e4d3c484b5cfaee385", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4973, "upload_time": "2017-03-20T14:57:15", "url": "https://files.pythonhosted.org/packages/e4/2e/5a2d604bd751927c749331af1cc42e3ebfd37e33fd9f01061c260fbe0804/sqlite3worker-1.1.5.tar.gz" } ], "1.1.6": [ { "comment_text": "", "digests": { "md5": "4b4f4eb96d2842d4de2b97d480734268", "sha256": "99d39d6041c5d82512a7dfe927eed4cdeed40b167995ae2d57cfc54a454d2f85" }, "downloads": -1, "filename": "sqlite3worker-1.1.6.tar.gz", "has_sig": false, "md5_digest": "4b4f4eb96d2842d4de2b97d480734268", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5927, "upload_time": "2017-03-20T15:01:15", "url": "https://files.pythonhosted.org/packages/25/42/195f6fbd52adb536e6197788457713ee0d4af4a8e779a840b4e734377b4c/sqlite3worker-1.1.6.tar.gz" } ], "1.1.7": [ { "comment_text": "", "digests": { "md5": "a72b4f3ae39a97b9648c5345dbef82f8", "sha256": "465980404cb843ed10e77475418ab4adb1320bbf1be2455425bed6af1d11dd4d" }, "downloads": -1, "filename": "sqlite3worker-1.1.7.tar.gz", "has_sig": false, "md5_digest": "a72b4f3ae39a97b9648c5345dbef82f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6042, "upload_time": "2017-03-21T00:25:29", "url": "https://files.pythonhosted.org/packages/df/99/2bf5b9423450fe6d81f319b116aac3ced1bc66fbbf3d97d1e4098bf16250/sqlite3worker-1.1.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a72b4f3ae39a97b9648c5345dbef82f8", "sha256": "465980404cb843ed10e77475418ab4adb1320bbf1be2455425bed6af1d11dd4d" }, "downloads": -1, "filename": "sqlite3worker-1.1.7.tar.gz", "has_sig": false, "md5_digest": "a72b4f3ae39a97b9648c5345dbef82f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6042, "upload_time": "2017-03-21T00:25:29", "url": "https://files.pythonhosted.org/packages/df/99/2bf5b9423450fe6d81f319b116aac3ced1bc66fbbf3d97d1e4098bf16250/sqlite3worker-1.1.7.tar.gz" } ] }