Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    pickleDB 0.3

    Download button

    No screenshots available
    Downloads: 120  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Harrison Erd | More programs
    BSD License / FREE
    November 24th, 2011, 10:40 GMT
    ROOT / Programming / Libraries

     Read user reviews (2)  Refer to a friend  Subscribe

    pickleDB description

    A small, fast, and simple database using pickle

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

    Commands

    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

    Example

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

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


    Installation

    pip install pickledb


    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    key-value store | pickle database | Python library | pickle | database | key-value

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM