Add example how to delete a key/value pair
bluepuma77 opened this issue · 2 comments
bluepuma77 commented
Thanks for this great piece of software, it really makes dealing with key/value pairs and sqlite so much easier.
The documentation is good, I am just missing SELECT error handling and a DELETE example.
try:
value = db[key]
except KeyError:
print('Key not found', key)
What's the best way to DELETE a key/value pair from sqlite?
luk3yx commented
The easiest way to delete items is del db[key]
, as SqliteDict
implements __delitem__
:
bluepuma77 commented
Perfect, thanks!