CodonU.file_handler.internal_comp

Module Contents

Functions

set_entrez_email(→ None)

Sets Bio.Entrez.email parameter to given email

set_entrez_api_key(→ None)

Sets Bio.Entrez.api_key parameter to given api_key

is_file_empty(→ bool)

Checks if an existing file is empty

is_file(→ bool)

Checks if file exists or not

is_file_writeable(path)

CodonU.file_handler.internal_comp.set_entrez_email(email: str | None) None

Sets Bio.Entrez.email parameter to given email

Parameters:

email – Email of user

Raises:

EmailWarning – If no email is provided

CodonU.file_handler.internal_comp.set_entrez_api_key(api_key: str | None) None

Sets Bio.Entrez.api_key parameter to given api_key

Parameters:

api_key – API key of the user

Raises:

ApiWarning – If no API key is provided

CodonU.file_handler.internal_comp.is_file_empty(path: str) bool

Checks if an existing file is empty

Parameters:

path – Path to the file

Returns:

True if empty else false

Raises:

FileNotEmptyError – If the given file to write is not empty

CodonU.file_handler.internal_comp.is_file(path: str) bool

Checks if file exists or not

Parameters:

path – Path to the file

Returns:

True if exists else False

CodonU.file_handler.internal_comp.is_file_writeable(path: str)