Skip to main content

No project description provided

Project description

Openleveldb repo Documentation Status Openleveldb license Black syntax

Openleveldb is a small pythonic wrapper around Plyvel

Features

Transparent object store

It works with python objects:

  • Automatically encodes objects into bytes when saving to leveldb
  • Automatically decodes bytes into their original type when retrieving objects from leveldb

Supported types include:

  • int
  • str
  • numpy.ndarray
  • Anything that is serializable by orjson
>>> db['key'] = {'key': [1, 2, 3]}
>>> db['key']
{'key': [1, 2, 3]}

Python dict-like protocol

It offers dict-like interface to LevelDB

>>> db["prefix", "key"] = np.array([1, 2, 3], dtype=np.int8)
>>> db["prefix", "key"]
array([1, 2, 3], dtype=int8)
>>> db = db["prefix", ...]
>>> db["key"]
array([1, 2, 3], dtype=int8)

String-only keys

The only possible type for the keys is str. It avoids several problems when working with prefixes.

Multiprocessing support

Experimental multiprocessing support using a background flask server, exposing the same API of a direct connection:

db = LevelDB(db_path="path_to_db", server_address="http://127.0.0.1:5000")

Project details


Download files

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

Files for openleveldb, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size openleveldb-0.1.3-py3-none-any.whl (14.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size openleveldb-0.1.3.tar.gz (12.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page