# More SQLite!
Multithreading for Sqlite, plus expression composition
[](https://pypi.org/project/mo-sqlite/)
[](https://github.com/klahnakoski/mo-sqlite/actions/workflows/build.yml)
[](https://coveralls.io/github/klahnakoski/mo-sqlite?branch=dev)
[](https://pepy.tech/project/mo-sqlite)
## Multi-threaded Sqlite
This module wraps the `sqlite3.connection` with thread-safe traffic manager. Here is typical usage:
from mo_sqlite import Sqlite
db = Sqlite("mydb.sqlite")
with db.transaction() as t:
t.command("insert into mytable values (1, 2, 3)")
While you may have each thread own a `sqlite3.connection` to the same file, you will still get exceptions when another thread has the file locked.
## Pull JSON out of database
This module includes a minimum experimental structure that can describe pulling deeply nested JSON documents out of a normalized database. The tactic is to shape a single query who's resultset can be easily converted to the desired JSON by Python. Read more on [pulling json from a database](docs/JSON%20in%20Database.md)
There are multiple normal forms, including domain key normal form, and columnar form; these have a multitude one-to-one relations, all represent the same logical schema, but differ in their access patterns to optimize for particular use cases. This module intends to hide the particular database schema from the caller; exposing just the logical schema.
This experiment compliments the [mo-columns](https://github.com/klahnakoski/mo-columns) experiment, which is about pushing JSON into a database.
Raw data
{
"_id": null,
"home_page": "https://github.com/klahnakoski/mo-sqlite",
"name": "mo-sqlite",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Kyle Lahnakoski",
"author_email": "kyle@lahnakoski.com",
"download_url": "https://files.pythonhosted.org/packages/4d/d1/ae33a2a71e8cf8cea447905efc43290a279a0dff6483a500c7e3524ddcfd/mo_sqlite-2.626.24125.tar.gz",
"platform": null,
"description": "# More SQLite!\r\n\r\nMultithreading for Sqlite, plus expression composition\r\n\r\n\r\n[](https://pypi.org/project/mo-sqlite/)\r\n[](https://github.com/klahnakoski/mo-sqlite/actions/workflows/build.yml)\r\n[](https://coveralls.io/github/klahnakoski/mo-sqlite?branch=dev)\r\n[](https://pepy.tech/project/mo-sqlite)\r\n\r\n\r\n## Multi-threaded Sqlite\r\n\r\nThis module wraps the `sqlite3.connection` with thread-safe traffic manager. Here is typical usage: \r\n\r\n from mo_sqlite import Sqlite\r\n db = Sqlite(\"mydb.sqlite\")\r\n with db.transaction() as t:\r\n t.command(\"insert into mytable values (1, 2, 3)\")\r\n\r\nWhile you may have each thread own a `sqlite3.connection` to the same file, you will still get exceptions when another thread has the file locked.\r\n\r\n## Pull JSON out of database\r\n\r\nThis module includes a minimum experimental structure that can describe pulling deeply nested JSON documents out of a normalized database. The tactic is to shape a single query who's resultset can be easily converted to the desired JSON by Python. Read more on [pulling json from a database](docs/JSON%20in%20Database.md)\r\n\r\nThere are multiple normal forms, including domain key normal form, and columnar form; these have a multitude one-to-one relations, all represent the same logical schema, but differ in their access patterns to optimize for particular use cases. This module intends to hide the particular database schema from the caller; exposing just the logical schema. \r\n\r\n\r\n\r\nThis experiment compliments the [mo-columns](https://github.com/klahnakoski/mo-columns) experiment, which is about pushing JSON into a database. \r\n \r\n",
"bugtrack_url": null,
"license": "MPL 2.0",
"summary": "Multithreading for Sqlite, plus expression composition",
"version": "2.626.24125",
"project_urls": {
"Homepage": "https://github.com/klahnakoski/mo-sqlite"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c371d646b8961c2c7ea05bc23040599e6390e74cec704f4d53a3d4878202fcb5",
"md5": "16b0b1c1df73aa6dcba03ce9489810a8",
"sha256": "6192fbbbea03449349ccabebcae72ac62f545e454fd42127d10d664ecc1a7f02"
},
"downloads": -1,
"filename": "mo_sqlite-2.626.24125-py3-none-any.whl",
"has_sig": false,
"md5_digest": "16b0b1c1df73aa6dcba03ce9489810a8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 39156,
"upload_time": "2024-05-04T21:05:47",
"upload_time_iso_8601": "2024-05-04T21:05:47.845308Z",
"url": "https://files.pythonhosted.org/packages/c3/71/d646b8961c2c7ea05bc23040599e6390e74cec704f4d53a3d4878202fcb5/mo_sqlite-2.626.24125-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4dd1ae33a2a71e8cf8cea447905efc43290a279a0dff6483a500c7e3524ddcfd",
"md5": "7b8d23f016868f97ff7c509445ec080a",
"sha256": "d29e568e8e6a9a3d8d5b2aee8094b53e7f36c7a157f16695da34cbbfcf6beeda"
},
"downloads": -1,
"filename": "mo_sqlite-2.626.24125.tar.gz",
"has_sig": false,
"md5_digest": "7b8d23f016868f97ff7c509445ec080a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 25995,
"upload_time": "2024-05-04T21:05:49",
"upload_time_iso_8601": "2024-05-04T21:05:49.652766Z",
"url": "https://files.pythonhosted.org/packages/4d/d1/ae33a2a71e8cf8cea447905efc43290a279a0dff6483a500c7e3524ddcfd/mo_sqlite-2.626.24125.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-04 21:05:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "klahnakoski",
"github_project": "mo-sqlite",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mo-sqlite"
}