rotifer.db.uniprot.webapi.idmapping.decode_results#

rotifer.db.uniprot.webapi.idmapping.decode_results(response, file_format, compressed)[source]#

Decode a results response body according to its file format.

Parameters:
responserequests.Response

Response carrying the results.

file_formatstr

One of json, tsv, xlsx or xml.

compressedbool

Whether the response body is gzip-compressed.

Returns:
object

A dict for json, a list of lines for tsv, a single-element list of bytes for xlsx, a single-element list of str for xml, or the raw response text otherwise.