Skip to main content

A small, fast, and simple database using pickle.

Project description


pickleDB is a small, lightweight, and fast key-value store. It was inspired by [redis][1] and [MongoDB][2]. pickleDB is built upon Python’s [pickle][3] module. BSD three-caluse licensed.


SET key value Set the string value of a key

GET key Get the value of a key

REM key Delete a key

LCREATE name Create a list

LADD name value Add a value to a list

LGETALL name Return all values in a list

LGET name pos Return one value in a list

LREM name Remove a list and all of its values

LPOP name pos Remove one value in a list


This is a quick example running through all of the current commands.

>>> import pickledb as db
>>> db.load('test.db')
>>> db.set('key', 'value')
>>> db.get('key')
>>> db.rem('key')
>>> db.get('key')
KeyError: 'key' # because its been deleted
>>> db.lcreate('a list')
>>> db.ladd('a list', 'something')
>>> db.ladd('a list', 'now something else')
>>> db.getall('a list')
['something', 'now something else']
>>> db.lget('a list', 0)
>>> db.lget('a list', 1)
'now something else'
>>> db.lpop('a list', 0)
>>> db.lgetall('a list')
['now something else']
>>> db.lrem('a list')
>>> db.lgetall('a list')
KeyError: 'a list' # because its been deleted


$ pip install pickledb


Once you’ve made your great commits:

  1. [Fork][4] pickleDB

  2. Create a topic branch - git checkout -b my_branch

  3. Push to your branch - git push origin my_branch

  4. Create an [Issue][5] with a link to your branch

  5. That’s it!

You can also send [me (patx)][6] and email with any suggestions and/or questions.


[1]: [2]: [3]: [4]: [5]: [6]:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pickleDB-0.1.1.tar.gz (2.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page