简体   繁体   中英

dictionary interface for large data sets

I have a set of key/values (all text) that is too large to load in memory at once. I would like to interact with this data via a Python dictionary-like interface.

Does such a module already exist?

Reading key values should be efficient and values compressed on disk to save space.

Edit:

  • Ideally cross platform, but only using Linux for now
  • Needs to be thread safe

Take a look at the shelve module. It provides dictionaries with various backing database systems include BerkleyDB and dbm.

假设您使用的是* nix平台,那么您只是乞求tokyo-cabinet ...它具有一组本机的ruby绑定...您可以在1978th.net上获取更多信息...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM