Skip to main content

Python bindings for leveldb database library

Project description

Build Instructions

pip install [–user] leveldb

NB If you have issues with this step, please contact Russell (power@cs.nyu.edu). I’m responsible for the PyPi package upload and any resulting errors.

Example Usage

>>> import leveldb
>>> db = leveldb.LevelDB('./db')
>>> db.Put('hello', 'world')
>>> print db.Get('hello')
world
>>> db.Delete('hello')
>>> db.Get('hello')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
KeyError
>>> for i in xrange(10):
...   db.Put(str(i), 'string_%s' % i)
...
>>> print list(db.RangeIter(key_from = '2', key_to = '5'))
[('2', 'string_2'), ('3', 'string_3'), ('4', 'string_4'), ('5', 'string_5')]
>>> batch = leveldb.WriteBatch()
>>> for i in xrange(1000):
...   db.Put(str(i), 'string_%s' % i)
...
>>> db.Write(batch, sync = True)
>>>

Author: Arni Mar Jonsson (arnimarj@gmail.com) - http://code.google.com/p/leveldb/

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

leveldb-0.12.tar.gz (225.3 kB view details)

Uploaded Source

File details

Details for the file leveldb-0.12.tar.gz.

File metadata

  • Download URL: leveldb-0.12.tar.gz
  • Upload date:
  • Size: 225.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for leveldb-0.12.tar.gz
Algorithm Hash digest
SHA256 a9643b98694a3f65da5782999b9ea23fa0978a7484098d50fdc680f5f51f87fc
MD5 ecb3353b0155db36919eee4792397758
BLAKE2b-256 9af4311eb490e0758d66b1fb9050294d852620258beabaf880008a188b46db6d

See more details on using hashes here.

Supported by

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