Python implementation of MimicDB
Switch branches/tags
Nothing to show
Latest commit 9d0e8eb Apr 20, 2015 Nathan Cahill correct md5 etag regex
Failed to load latest commit information.
docs docs Sep 2, 2014
mimicdb correct md5 etag regex Apr 20, 2015
tests fix missing header Sep 2, 2014
.coveragerc tests for backends Sep 1, 2014
.gitignore Initial commit Nov 19, 2013
.travis.yml coveralls Sep 1, 2014
CHANGES.txt 1.0 Aug 31, 2014
LICENSE pypi Sep 2, 2014
MANIFEST 1.0 Aug 31, 2014 readme Sep 2, 2014
README.txt readme Sep 2, 2014 add benchmark Sep 1, 2014
requirements.txt require redis for tests Sep 2, 2014 version bump Apr 20, 2015


PyPI Build Status Coverage Status

Python Implementation of MimicDB

The Python implementation of MimicDB works with the Boto library and several different backends including Redis.


By default, MimicDB requires Redis (although other backends can be used instead).

$ pip install boto
$ pip install redis
$ pip install mimicdb


If you're using Boto already, replace boto imports with mimicdb imports.


from boto.s3.connection import S3Connection
from boto.s3.key import Key


from mimicdb.s3.connection import S3Connection
from mimicdb.s3.key import Key

Additionally, import the MimicDB object itself, and initiate the backend:

from mimicdb import MimicDB

After establishing a connection for the first time, sync the connection to save the metadata locally:

conn = S3Connection(KEY, SECRET)

Or sync only a couple buckets from the connection:

conn.sync('bucket1', 'bucket2')

After that, upload, download and list as you usually would. API calls that can be responded to locally will return instantly without hitting S3 servers. API calls that are made to S3 using MimicDB will be mimicked locally to ensure consistency with the remote servers.

Pass force=True to most functions to force a call to the S3 API. This also updates the local database.

Alternate Backends

Besides the default Redis backend, MimicDB has SQLite and in-memory backends available.

from mimicdb.backends.sqlite import SQLite
from mimicdb.backends.memory import Memory



  1. Fork the repo.
  2. Run tests to ensure a clean, working slate.
  3. Improve/fix the code.
  4. Add test cases if new functionality introduced or bug fixed (100% test coverage).
  5. Ensure tests pass.
  6. Push to your fork and submit a pull request to the develop branch.


Run tests after installing nose and coverage.

$ nosetests --with-coverage --cover-package=mimicdb

Integration testing is provided by Travis-CI at

Test coverage reporting is provided by Coveralls at


Run in the root of the repo:

$ python
Boto Time: 0.338411092758
MimicDB Time: 0.00015789039612
Factor: 2143x faster


MimicDB is BSD licensed.