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.

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.


E-utility or common database name.


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.

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.


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