Skip to main content

No project description provided

Project description

Documentation Status

Openleveldb is a small pythonic wrapper around Plyvel

Features

Transparent object store

It works with python objects:

  • Automatically encodes objects into bytes 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.

Source Distribution

openleveldb-0.1.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openleveldb-0.1.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file openleveldb-0.1.0.tar.gz.

File metadata

  • Download URL: openleveldb-0.1.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0 CPython/3.7.5 Linux/4.19.96-1-MANJARO

File hashes

Hashes for openleveldb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 83f237a8e472a9d19dff9c32c8001f6ce6e45102f4f7071e74505e6db76ff1bf
MD5 47942801e952ce5fe152d1d394e74e15
BLAKE2b-256 97b8cd71bf575e584d15d4decd8fe9ba84b433a7a83b170aacaae57066be73cd

See more details on using hashes here.

File details

Details for the file openleveldb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: openleveldb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0 CPython/3.7.5 Linux/4.19.96-1-MANJARO

File hashes

Hashes for openleveldb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43d5d486935ce3c9c609d817c4249de170a0078bd2ede808e8e5c7fef5a267f0
MD5 80714beaa69cd5ca04165a216c32f869
BLAKE2b-256 6ef297adb733fd3fdc6d59a395c117ca253e195d4123d5022ebfd36fa74dc2d4

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