Use CouchDB filters instead of filtering in Python