Skip to main content
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:

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.

https://travis-ci.org/eugene-eeo/tinyrecord.svg?branch=master

Metadata

Release files for tinyrecord 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tinyrecord 0.2.0
File Size Uploaded Provenance Actions
tinyrecord-0.2.0.tar.gz 5.6 kB Without provenance Details for tinyrecord-0.2.0.tar.gz

Release files / tinyrecord-0.2.0.tar.gz

Download URL tinyrecord-0.2.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
eb6dc23601be359ee00f5a3d31a46adf3bad0a16f8d60af216cd67982ca75cf4
BLAKE2b-256 checksum
How to use checksums
d86ca004d025d9bf1d8af014fd6f22bd6e49e4533d6fbac54f7d4ae7acb3ef5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

Security for tinyrecord 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page