TinyDB insertion fails

I try to insert the JSON serialization of a Python object into tinydb. It works one time and fails after that. from tinydb import TinyDB, Query import json class Test: def __init__(self): ...

Cannot import name 'TinyDB'

I installed tinydb with pip. pip install tinydb I also tried it with pip3 I used the example code of tinydb to test it. from tinydb import TinyDB, Query db =...

Unable to import tinyDB python

i'm currently facing an issue with importing the tinyDB python package into python. These are the steps I did to install tinyDB in raspbian. 1. Running the command: sudo pip3 install...

Add multiple tinyDB databases together

How do I add multiple tinyDB (document based database) databases together without getting a AssertionError error? I'm trying to add in this example 12 tinyDB databases together. File...

NullPointerException while using TinyDB

I'm new to android (and not a veteran at all in java) developpment. Trying to do a weather app, I'm trying to use TinyDB as my storage for saved cities. A button on another activity let me add...

TinyDB get all IDs in list query

I'm using TinyDB in my python project. However, in order to make the logic effective, I need to be able to get multiple objects in a query. My preference would be to use a list listOfIDs =...

Merge Two TinyDB Databases

On Python, I'm trying to merge multiple JSON files obtained from TinyDB. I was not able to find a way to directly merge two tinydb JSON files that have keys autogenerated in the sequence that not...

TinyDB error putint null object reference android

TinyDb class is here im using it simply by default codes like : TinyDB tinyDB = new TinyDB(MyActivity.this); and tinyDB.putInt("hadi" , 10); but im getting an error that i cant...

ModuleNotFoundError: No module named 'tinydb'

from tinydb import TinyDB, Query I get the error ModuleNotFoundError: No module named 'tinydb' even though... I have already downloaded the module, when I run pip3 install tinydb: Requirement...

Python: cannot read json-file with tinydb

I've got the following json-file: tag.tg [{"_type": "tag", "name": "A0", "path": "Drivers\\CMSIS\\Include\\arm_math.h",...

TinyDB, storing multiple lists in TinyDB, split stored data in tinyDB

I am making an app with App Inventor, which calculates runners time and position, and store this data in TinyDB. This data is displayed on screen as well. Now the point comes to post it to my...

ImportError: no module named tinydb

I am using from tinydb import TinyDB, Query to import the tinydb module. This works completely fine when testing my python and kivy code. After using buildozer to create an apk and debugging, it...

Adding values from TinyDB

So I have a TinyDB with time as a tag and data from Bluetooth as a value, I want to find a way to sum all the values and store as a variable. A possible way to do that is create a empty list and...

Find objects between two dates TinyDB

I'm trying tinydb with FastAPI, but i got stuck with dates, Is there a function for finding objects between two dates in TinyDB, i couldn't find any like Pymongo's $gt etc. , i tried something...

Match multiple keys values to database entry in TinyDB?

I am having a hard time finding out if I can check multiple key values at once with TinyDB. Currently I can check multiple fields by using and in an if statement like this: def...

Dynamically parse and build TinyDB queries

Would it be possible to dynamically build queries in TinyDB? Its logical query operation is like this: >>> from tinydb import TinyDB, where >>> db =...

Android Shared Preference TinyDB putListObject frunction

I'm trying to save an object list to the Shared Preferences using TinyDB's putListObject function, but I'm getting a Wrong 2nd argument type error. I can use the putObject function just fine, the...

Python TinyDB Get last record in db

I am trying to get the last record from my tinyDB, so I want to make a query that looks like that: "SELECT * FROM table ORDER BY id DESC LIMIT 1" which should give me the last row....

it is possible to input a document id on tinydb? an upsert is possible?

it is possible to define a document id when inserting a document into a TinyDB database? for example (from the tutorial) https://pypi.python.org/pypi/tinydb from tinydb import TinyDB, where from...

TinyDB - SharedPreferences - getting: Forgot to register a type adapter?

I just discovered TinyDB which seems quite useful to handle object storage into the SharedPreferences. I'm almost there but I'm getting an error: Forgot to register a type adapter? Note that the...

how to include a variable in tinydb query in python?

from tinydb import TinyDB, Query db = TinyDB('db.json') ddd = Query() kl = free output = db.search(ddd.state == 'free') How to use variable k1 in tinydb db.search?

Redirecting all python file output to tinydb

I have a python script which consists of several threads running and they have print outs to tell any connection failure, e.g. failed to open ports, failed to connect etc. I've tried the...

How to install TinyDB?

I am trying to install TinyDB as I need to use it for a python program. I have tried following tutorials that suggest installing it via the command prompt. However, whenever I type 'python', it...

How to delete record or document from TinyDB

How to delete record or document from TinyDB Example of DB: {"1" : {"id_key" : "xxx", "params" : {} } }, {"2" : {"id_key" :...

Get all the keys from TinyDB database

I create a tinydb database that looks as such: {"_default": {"1": {"word": "cat", "definition": "Its an animal."}, ...

TinyDB search with a variable in query

I'm trying to execute a directory list and make a search by filename in a TinyDb database, like below: ``` from tinydb import TinyDB, Query import os, fnmatch db =...

How do i insert multiple tables into a table using TinyDB?

I have been trying to create multiple tables in a table using TinyDB. Here is a website to help you understand what TinyDb is (TinyDB PDF). The PDF file did not show how to insert multiple tables...

Unexpected behavior when using YAML Storage with TinyDB

I'm using TinyDB for a small CLI utility to manage personal document drafts. The database stores metadata for each draft; the file should be human-editable (so that I can add details manually),...

Get all usernames stored in TinyDB database

I'm new to TinyDB, and new to Python. I have various usernames stored in a TinyDB database, they also have other information stored (age, email addresses etc), however, I wish to return all the...

Parsing large csv file to tinydb takes forever

I have a large csv file containing 15 columns and approximately 1 million rows. I want to parse the data into tinyDB. The code I use is below: import csv from tinydb import TinyDB db =...