::
TinyDB __ _ __
/ /_(_)__ __ _________ _______ _______/ /
/ __/ / _ \/ // / __/ -_) __/ _ \/ __/ _ /
\__/_/_//_/\_, /_/ \__/\__/\___/_/ \_,_/
/___/
**Supported Pythons:** 3.5+
Tinyrecord is a library which implements atomic
transaction support for the `TinyDB`_ NoSQL database.
It uses a record-first then execute architecture which
allows us to minimize the time that we are within a
thread lock. Usage example:
.. code-block:: python
from tinydb import TinyDB, where
from tinyrecord import transaction
table = TinyDB('db.json').table('table')
with transaction(table) as tr:
# insert a new record
tr.insert({'username': 'john'})
# update records matching a query
tr.update({'invalid': True}, where('username') == 'john')
# delete records
tr.remove(where('invalid') == True)
# update using a function
tr.update(updater, where(...))
# insert many items
tr.insert_multiple(documents)
Note that due to performance reasons you cannot view
the data within a transaction unless you've comitted.
You will have to call operations on the transaction
object and not the database itself. Since tinyrecord
works with dictionaries and the latest API, it will
only support the latest version (**4.x**).
Installation is as simple as ``pip install tinyrecord``.
.. image:: https://travis-ci.org/eugene-eeo/tinyrecord.svg?branch=master
:target: https://travis-ci.org/eugene-eeo/tinyrecord
.. _TinyDB: https://github.com/msiemens/tinydb
Raw data
{
"_id": null,
"home_page": "https://github.com/eugene-eeo/tinyrecord",
"name": "tinyrecord",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": "",
"keywords": "tinydb nosql database transaction",
"author": "Eugene Eeo",
"author_email": "141bytes@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d8/6c/a004d025d9bf1d8af014fd6f22bd6e49e4533d6fbac54f7d4ae7acb3ef5f/tinyrecord-0.2.0.tar.gz",
"platform": "",
"description": "::\n\n TinyDB __ _ __\n / /_(_)__ __ _________ _______ _______/ /\n / __/ / _ \\/ // / __/ -_) __/ _ \\/ __/ _ /\n \\__/_/_//_/\\_, /_/ \\__/\\__/\\___/_/ \\_,_/\n /___/\n\n\n**Supported Pythons:** 3.5+\n\nTinyrecord is a library which implements atomic\ntransaction support for the `TinyDB`_ NoSQL database.\nIt uses a record-first then execute architecture which\nallows us to minimize the time that we are within a\nthread lock. Usage example:\n\n.. code-block:: python\n\n from tinydb import TinyDB, where\n from tinyrecord import transaction\n\n table = TinyDB('db.json').table('table')\n with transaction(table) as tr:\n # insert a new record\n tr.insert({'username': 'john'})\n # update records matching a query\n tr.update({'invalid': True}, where('username') == 'john')\n # delete records\n tr.remove(where('invalid') == True)\n # update using a function\n tr.update(updater, where(...))\n # insert many items\n tr.insert_multiple(documents)\n\nNote that due to performance reasons you cannot view\nthe data within a transaction unless you've comitted.\nYou will have to call operations on the transaction\nobject and not the database itself. Since tinyrecord\nworks with dictionaries and the latest API, it will\nonly support the latest version (**4.x**).\n\nInstallation is as simple as ``pip install tinyrecord``.\n\n.. image:: https://travis-ci.org/eugene-eeo/tinyrecord.svg?branch=master\n :target: https://travis-ci.org/eugene-eeo/tinyrecord\n.. _TinyDB: https://github.com/msiemens/tinydb",
"bugtrack_url": null,
"license": "MIT",
"summary": "Atomic transactions for TinyDB",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://github.com/eugene-eeo/tinyrecord"
},
"split_keywords": [
"tinydb",
"nosql",
"database",
"transaction"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d86ca004d025d9bf1d8af014fd6f22bd6e49e4533d6fbac54f7d4ae7acb3ef5f",
"md5": "cbaae3f4599b12e3bea67ca4a75eca99",
"sha256": "eb6dc23601be359ee00f5a3d31a46adf3bad0a16f8d60af216cd67982ca75cf4"
},
"downloads": -1,
"filename": "tinyrecord-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "cbaae3f4599b12e3bea67ca4a75eca99",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 5556,
"upload_time": "2020-07-05T15:43:06",
"upload_time_iso_8601": "2020-07-05T15:43:06.056982Z",
"url": "https://files.pythonhosted.org/packages/d8/6c/a004d025d9bf1d8af014fd6f22bd6e49e4533d6fbac54f7d4ae7acb3ef5f/tinyrecord-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2020-07-05 15:43:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "eugene-eeo",
"github_project": "tinyrecord",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "tinyrecord"
}