API Reference

Displays Royal Society of Chemistry “On This Day In Chemistry” facts in your terminal.

Functions:

clear_cache()

Clear any cached responses.

get_fact([month, day])

Returns the fact for the given date.

clear_cache()[source]

Clear any cached responses.

Return type

int

get_fact(month=None, day=None)[source]

Returns the fact for the given date.

Parameters
  • month (Union[str, int, None]) – The month, either its short name (e.g. 'Oct'), its full name (e.g. 'October') or its number (e.g. 10). Default None.

  • day (Union[str, int, None]) – The day of the month. Default None.

If month and day are both left as None (the default) the current date is used.

Return type

Tuple[str, str]