Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am swstack on github.
  • I am swstack (https://keybase.io/swstack) on keybase.
  • I have a public key ASCmg2LAAiAgj1DnSQki5q6-78lC-plfp7lghGINPSefngo

To claim this, I am signing this object:

@swstack
swstack / database.py
Last active August 29, 2015 14:16
Small web server built using webapp2 and MongoDB to handle uploading large files through the means of streaming.
import time
from pymongo import MongoClient
from bson.binary import MD5_SUBTYPE, Binary
class Database(object):
"""Encapsulation of the MongoDB database and collection(s)
For the context of this application this class will only provide an API
for storing and fetching files.