biotite.database.entrez.fetch_single_file

biotite.database.entrez.fetch_single_file(uids, file_name, db_name, ret_type, ret_mode='text', overwrite=False)[source]

Almost the same as fetch(), but the data for the given UIDs will be stored in a single file.

Parameters
uidsiterable object of str

A list of UIDs of the file(s) to be downloaded.

file_namestr or None

The file path, including file name, to the target file.

db_namestr:

E-utility or common database name.

ret_typestr

Retrieval type.

ret_modestr, optional

Retrieval mode.

overwritebool, optional

If false, the file is only downloaded, if no file with the same name already exists.

Returns
filestr or StringIO or BytesIO

The file name of the downloaded file. If file_name is None, the file content is stored in either a StringIO or a BytesIO object.

Warning

Even if you give valid input to this function, in rare cases the database might return no or malformed data to you. In these cases the request should be retried. When the issue occurs repeatedly, the error is probably in your input.

See also

fetch