(db, keys)
return r.json()['rows']
Copied from dimagi-utils get_docs. Returns a response for every key.
Copied from dimagi-utils get_docs. Returns a response for every key.
Copied from dimagi - utils get_docs . Returns a response for every key .
def send_keys_to_couch(db, keys):
    """
    Copied from dimagi-utils get_docs. Returns a response for every key.
    """
    url = db.uri + '/_all_docs'
    rsession = db._request_session
    r = rsession.post(url=url,
                      data=json.dumps({'keys': [_f for _f in keys if _f]}),
                      headers={'content-type': 'application/json'},
                      params={'include_docs': 'true'})
    return r.json()['rows']
def send_keys_to_couch ( db , keys ) : url = db . uri + '/_all_docs' rsession = db . _request_session r = rsession . post ( url = url , data = json . dumps ( { 'keys' : [ _f for _f in keys if _f ] } ) , headers = { 'content-type' : 'application/json' } , params = { 'include_docs' : 'true' } ) return r . json ( ) [ 'rows' ]