*large* python dictionary with persistence storage for quick look-ups

前端 未结 6 1740
心在旅途
心在旅途 2020-12-08 21:05

I have a 400 million lines of unique key-value info that I would like to be available for quick look ups in a script. I am wondering what would be a slick way of doing this.

6条回答
  •  感动是毒
    2020-12-08 21:28

    If you want to persist a large dictionary, you are basically looking at a database.

    Python comes with built in support for sqlite3, which gives you an easy database solution backed by a file on disk.

提交回复
热议问题