Skip to main content
Help us improve Python packaging – donate today!

LazyDB is a basic wrapper around the Python shelve flatfile dbm module.

Project Description

Build Status

LazyDB is a basic wrapper around the Python shelve flatfile dbm module. LazyDB provides a couchdb/S3 like layer of abstraction around shelve, allowing convenient access (read and write) to shelve without sacrificing the convenience of writing pickled python objects to disk.

From the help(shelve) documentation: A “shelf” is a persistent, dictionary-like object. The difference with dbm databases is that the values (not the keys!) in a shelf can be essentially arbitrary Python objects – anything that the “pickle” module can handle. This includes most class instances, recursive data types, and objects containing lots of shared sub-objects. The keys are ordinary strings.

Disclaimer: I wouldn’t suggest using this module for production projects as I predict it having difficulty scaling. LazyDB is ideal for supporting smaller projects with light data in which the programmer must move quickly and intends to implement an alternate db solution sooner rather than later. The intent is to provide a more elegant interface for utilizing the shelve module, not to create an efficient replacement.

Typical usage often looks like this:

#!/usr/bin/env Python

from lazydb import Db

class LazyUser:
      def __init__(self, name):
          self.name = name

db = Db('/home/user/db')
db.put('user', LazyUser('lazybones'))
u = db.get('user')
u.name

## Contributors

Currently, this project is maintained by Mek.

Release history Release notifications

History Node

0.1.80

History Node

0.1.70

History Node

0.1.68

History Node

0.1.67

This version
History Node

0.1.66

History Node

0.1.65

History Node

0.1.64

History Node

0.1.62

History Node

0.1.6

History Node

0.1.4

History Node

0.1.2

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
LazyDB-0.1.66-py2.py3-none-any.whl (6.9 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Aug 1, 2015
LazyDB-0.1.66.tar.gz (6.4 kB) Copy SHA256 hash SHA256 Source None Jun 6, 2013

Supported by

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