TIL–Python has a built-in persistent key-value store (2018)
There's also the shelve[0] module which allows storing any pickleable object in a persistent key-value store, not just string/bytes. I've found it's very handy for caching while developing scripts which query remote resources, and not have to worry about serialization.<p>[0] <a href="https://docs.python.org/3.10/library/shelve.html" rel="nofollow">https://docs.python.org/3.10/library/shelve.html</a><p>Obligatory pickle note: one should be aware of pickle security implications and should not open a "Shelf" provided by untrusted sources, or rather should treat opening a shelf (or any pickle deserialization operation for that matter) as running an arbitrary Python script (which cannot be read).