Utilities#

Common#

colour_datasets.utilities

json_open(url[, retries])

Open given url and return its content as JSON.

hash_md5(filename[, chunk_size])

Compute the Message Digest 5 (MD5) hash of given file.

suppress_stdout()

A context manager and decorator temporarily suppressing standard output.

url_download(url, filename[, md5, retries])

Download given url and saves its content at given file.

Spreadsheet#

colour_datasets.utilities

row_to_index(row)

Return the 0-based index of given row name.

index_to_row(index)

Return the row name of given 0-based index.

column_to_index(column)

Return the 0-based index of given column letters.

index_to_column(index)

Return the column letters of given 0-based index.

cell_range_values(sheet, cell_range)

Return given workbook sheet cell range values, i.e. the values of the rows and columns for given cell range.