Skip to main content

LazyDB

![Build Status](https://travis-ci.org/mekarpeles/lazydb.png)

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.

Metadata

Release files for LazyDB 0.1.80

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for LazyDB 0.1.80
File Size Uploaded Provenance
LazyDB-0.1.80.tar.gz 7.1 kB Without provenance Details

Release files / LazyDB-0.1.80.tar.gz

Download URL LazyDB-0.1.80.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
19d6bd761fe2c5c6410a8fd3ec6c85d6cd55be3a4fc95103aa87f8c10de0a4eb
BLAKE2b-256 checksum
How to use checksums
3676c4b6e7f82be90cb2311e6fc0280b04cacb63e39ff15635b38cb4de84ad1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for LazyDB 0.1.80

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page