sqlitedict
sqlitedict copied to clipboard
Persistent dict, backed by sqlite3 and pickle, multithread-safe.
I don't understand this part in the documentation: ``` | commit(self, blocking=True) | Persist all data to disk. | | When `blocking` is False, the commit command is queued, but...
When SqliteDict is initialized, a connection to SQLite is opened ([in here](https://github.com/RaRe-Technologies/sqlitedict/blob/39e8dced2f56498df6e0d58a0addf42297917d3f/sqlitedict.py#L173)). This connection might fail. If an exception happens, the connection does not get opened. However, the initialization still...
I have found that wrapping sqlitedict in an class with a destructor doesn't seem to work. Here's just a snippet of my code: ```py from sqlitedict import SqliteDict class Store():...
I trigger 10 thread of workers that fill the userDb, without any locking mechanisem ``` def worker(name, value): userDb[name] = value def sync(): userDb.commit() userDb = SqliteDict('./usernames.sqlite', encode=json.dumps, decode=json.loads, autocommit=False)...
As one would expect with a normal dictionary, it cannot be used (easily) with multiprocessing for writing values. However, a normal diction can be used for reading. sqlitedict fails even...
When using integer keys, they are converted to strings. Therefore: ```python mysqlitedict['1'] = 'ONE' mysqlitedict[1] = 1 ``` all refer to the same thing.
I have a file created by sqlitedict in python2.7, file size is 11.37GB (number of keys:761951). Recently I opened it with read-only flag in Python3.6. Something interesting: Scenario A: If...
A sqlitedict db is created and saved to disk eg. with SqliteDict('mydb'), flag='c') as db: db.close() How can you now use 'mydb' in-memory using the sqlite :memory option with sqlitedict?
Current sqlite version is [3.16](https://sqlite.org/download.html) Some linux distributions have this version and we can't reproduce the issues reported in them because Travis is outdated. We use Travis Ubuntu Trusty env...