Skip to main content

A python key-value MongoDB database

Project description

Introduction

mongodbm is a Python package to use a MongoDB server as a python dbm-style key/value database. It implements all of the MutableMapping methods in Python and is implemented in MongoDB using the GridFS spec to allow for values of any size. Keys must be strings (as the filename in GridFS) and values can be set as either bytes or file-like objects. Values returned by mongodbm are always file-like objects (specifically the GridOut object from pymongo).

This package was primarily made to be a fast and persistent key/value store that can have multiple readers and writers across multiple Python instances. MongoDB handles the race conditions so that I don’t have to. The initial primary use-case is as a local cache for web apps where the source data are stored in remote S3 systems.

A MongoDB server must be running and accessible for mongodbm to work.

If someone is brave enough to try this out, take a look at the doc strings of the mongodbm.open function to find out what you need to do. It’s pretty straightforward.

Installation

Install via pip:

pip install mongodbm

Or conda:

conda install -c mullenkamp mongodbm

I’ll probably put it on conda-forge once I feel like it’s up to an appropriate standard…

TODO

More documentation and I need to write a lot more tests for the functionality.

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

mongodbm-0.0.3.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

mongodbm-0.0.3-py2.py3-none-any.whl (9.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file mongodbm-0.0.3.tar.gz.

File metadata

  • Download URL: mongodbm-0.0.3.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 pkginfo/1.8.2 readme-renderer/27.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.4.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.15

File hashes

Hashes for mongodbm-0.0.3.tar.gz
Algorithm Hash digest
SHA256 76c4d3210048b712c0ba0ebda522a9126548b58e18ec44c62d7965a520cf47ba
MD5 95a0bfa9ec0e7de4e4a012dfbcb02ff5
BLAKE2b-256 250c0b5da8745d1296bc16319f5f511be1a56a56e174debb2cd426d07392b568

See more details on using hashes here.

File details

Details for the file mongodbm-0.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: mongodbm-0.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 pkginfo/1.8.2 readme-renderer/27.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.4.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.15

File hashes

Hashes for mongodbm-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b497530c2fb89949188b1d45ba5443a8c23681a196f9fe1a32390029a328cbc1
MD5 74ff0a7b2ed2e74d649c8eabfd6afc98
BLAKE2b-256 aa41c314cd8774f6135c4f52b7a7951929bf50b4fec1d8962a47b33cef21d42a

See more details on using hashes here.

Supported by

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