skip to navigation
skip to content

Not Logged In

filedb 0.2.1

Create a file that pretends to be a database query

Latest Version: 0.2.3

# filedb Create a file that pretends to be a MongoDB collection. If you try to open the file, it will JSONify the collection and dump it back to you.

## Why? Because our enterprise database is file based, but our cloud based database isn't.

## really why? Files are simpler and don't break. The database operations we need to perform aren't complicated and don't require high performance. By using files there isn't a database that can fail. There's the added benefit that if customers want to use different types of databases for distributed systems, we can plug into any of them using a filedb (we just have to make something that dumps out JSON .

## Quickstart

#### Install FUSE Make sure you have [FUSE]( installed.

#### Get mongo running And you'll need a collection with some data in it. `bash $ mongod `

`bash $ mongo > use test > db.people.insert({"username": "greg"}) > db.people.insert({"username": "phil"}) > db.people.insert({"username": "bob"}) > db.people.insert({"username": "samantha"}) `

#### Install filedb `bash $ pip install filedb `

#### Running via python `bash $ filedb /tmp/tutorial/mnt/ mongodb://localhost:27017/test people `

#### Open the file `bash $ cat /tmp/tutorial/mnt/db [{ "_id": "52f104a7a0fb769e0cd0d1d4", "username": "greg" } { "_id": "52f104a9a0fb769e0cd0d1d5", "username": "phil" } { "_id": "52f104aca0fb769e0cd0d1d6", "username": "bob" } { "_id": "52f104aea0fb769e0cd0d1d7", "username": "samantha" }] `

## Running as a service Upstart job. `bash # install the job $ sudo cp -R overlay/* / # or $ wget $ sudo mv filedb.conf /etc/init/filedb.conf # start the job $ sudo start filedb `

File Type Py Version Uploaded on Size
filedb-0.2.1-py2.7.egg (md5) Python Egg 2.7 2014-02-04 4KB
filedb-0.2.1.tar.gz (md5) Source 2014-02-04 2KB
  • Downloads (All Versions):
  • 48 downloads in the last day
  • 252 downloads in the last week
  • 908 downloads in the last month