{"id":19070081,"url":"https://github.com/kaaass/sqlite_queue_python","last_synced_at":"2026-03-17T18:36:45.462Z","repository":{"id":49326839,"uuid":"106976744","full_name":"kaaass/sqlite_queue_python","owner":"kaaass","description":"A simple sqlite queue with a SQL statement encapsulation.","archived":false,"fork":false,"pushed_at":"2017-10-15T03:51:44.000Z","size":22,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-28T14:14:07.633Z","etag":null,"topics":["python-library","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaaass.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-15T02:06:12.000Z","updated_at":"2024-08-06T10:49:15.000Z","dependencies_parsed_at":"2022-08-25T18:11:40.469Z","dependency_job_id":null,"html_url":"https://github.com/kaaass/sqlite_queue_python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaaass%2Fsqlite_queue_python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaaass%2Fsqlite_queue_python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaaass%2Fsqlite_queue_python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaaass%2Fsqlite_queue_python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaaass","download_url":"https://codeload.github.com/kaaass/sqlite_queue_python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251326851,"owners_count":21571636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python-library","sqlite"],"created_at":"2024-11-09T01:17:01.175Z","updated_at":"2026-03-17T18:36:40.429Z","avatar_url":"https://github.com/kaaass.png","language":"Python","readme":"# sqlite_queue_python\r\n\r\n[Origin repo](https://gitee.com/kaaass/sqlite_queue_python)\r\n\r\nA simple sqlite queue with a SQL statement encapsulation. A convenient solution of sqlite concurrency.\r\n\r\nSqliteQueue maintains a queue of sqlite query. Support peewee request. SqlQuery contains a simple SQL statement encapsulation.\r\n\r\n## Example\r\n\r\nA simple queue could be created in just 2 lines.\r\n\r\n```python\r\nimport sqlite_queue\r\n\r\nqueue = sqlite_queue.SqliteQueue('test.db')\r\nqueue.start()\r\n```\r\n\r\nHere is a complete example.\r\n\r\n```python\r\nimport sqlite_queue\r\n\r\nqueue = sqlite_queue.SqliteQueue('test.db')\r\nqueue.setDaemon(False)  # Default a daemon thread\r\nqueue.start()\r\n\r\n# INSERT statement\r\nfor i in range(12,15):\r\n    queue.register_execute(\"INSERT INTO stocks VALUES ('2017-02-04','BUY','RHAT',?,35.14)\", (i,)\r\n\t\t, callback=lambda lst_row, data: print(lst_row))\r\n\r\n# SELECT statement\r\nqueue.register_execute(\"SELECT * FROM stocks\", callback=lambda lst_row, data: print(data))\r\n\r\n# Encapsulation of SELECT statement. \r\nqueue.select('stocks').where('price', '\u003e=', 30) \\\r\n                        .order('price').page(1, 5)\\\r\n                        .register(callback=lambda lst_row, data: print(data))\r\n```\r\n\r\n## Installation\r\n\r\nFor python3, just run:\r\n\r\n```\r\npip3 install sqlite_queue\r\n```\r\n\r\nfor other condition:\r\n\r\n```\r\npip install sqlite_queue\r\n```\r\n\r\nor you could use setup.py.\r\n\r\n```\r\npython setup.py install\r\n```\r\n\r\n## TODO List\r\n\r\n- 完成：_实现简单的SQL语句拼接_\r\n- 完成：_实现WHERE语句拼接_\r\n- 完成：_实现对回调函数参数的自动识别、匹配_\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaaass%2Fsqlite_queue_python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaaass%2Fsqlite_queue_python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaaass%2Fsqlite_queue_python/lists"}