'Wrap MongoDB connection.
If item is the name of an executable method, for example find or
insert, wrap this method in the MongoConn.
Else wrap getting attribute with MongoProxy.'

def __getattr__(self, item):

    if (item in ('conf',)):
        return super(MongoProxy, self).__getattr__(item)
    elif (item in ('name', 'database')):
        return getattr(self.conn, item)
    elif (item in MONGO_METHODS):
        return MongoConn(self.conf, getattr(self.conn, item))
    return MongoProxy(self.conf, getattr(self.conn, item))
