qbitkit.error.error module

class qbitkit.error.error.Log[source]

Bases: object

timestamp()[source]

Returns the current time and date with lots of precision.

Parameters

self (NoneType) – unused parameter that does absolutely nothing. (default None)

Returns

str – string describing the current time and date.

msg(print_msg=False)[source]

Attaches a timestamp to a specified message, and prints the message if specified. Returns formatted message.

Parameters
  • msg (str) – the message you would like to prepend a timestamp to and return and optionally print. (default None)

  • print_msg (str) – specify whether or not to print the message in addition to returning it as usual. (default False)

Returns

str – timestamped and formatted message

class qbitkit.error.error.Errors[source]

Bases: object

not_specified(level='Warning')[source]

Throw an error warning the user that a specified resource has not been specified.

Parameters
  • resource (str) – name of resource to use in error message. (default None)

  • level (str) – string with desired warning level (default ‘Warning’)

support_status(resource_name='this qbitkit feature', additional_notes=None)[source]

Generate a warning based on specified keyword arguments that warns users that a certain feature is at a certain support stage.

Parameters
  • feature_state (str) – The state of the feature, such as experimental or beta. (default ‘experimental’)

  • resource_name (str) – The name of the feature (resource) to display the feature state of. (default ‘this qbitkit feature’)

  • additional_notes (str) – Tack on a note to the end of the warning (default None)

Returns

str – the generated error message based on specified keyword arguments.