ask_amy.utilities package

Submodules

ask_amy.utilities.iso_8601_validator module

class ask_amy.utilities.iso_8601_validator.AMAZON_NUMBER

Bases: ask_amy.utilities.slot_validator.Slot_Validator

is_valid_value(value)
class ask_amy.utilities.iso_8601_validator.AMAZON_TIME

Bases: ask_amy.utilities.slot_validator.Slot_Validator

is_valid_value(value)

ask_amy.utilities.slot_validator module

class ask_amy.utilities.slot_validator.Slot_Validator

Bases: object

static class_from_str()
is_valid_value(value)

ask_amy.utilities.time_of_day module

class ask_amy.utilities.time_of_day.TimeOfDay

Bases: object

Breakfast = 0
Daytime = 3
Dinner = 2
Lunch = 1
Nighttime = 4
static current_time(now=datetime.datetime(2018, 7, 25, 10, 47, 18, 739754))

current time with an offset applied :param time_adj: a positive or negative int to offset current time :param now: current time or passed time used for testing :return: a str version of time showing hours:minutes and am pm

static day_night(now=datetime.datetime(2018, 7, 25, 10, 47, 18, 739761))

Calculate if it Daytime or Nighttime after applying and hours offset :param time_adj: :param now: current time or passed time used for testing :return:

static meal_time(now=datetime.datetime(2018, 7, 25, 10, 47, 18, 739759))

Calculate if its breakfast, lunch or dinner time after applying and hours offset :param time_adj: :param now: current time or passed time used for testing :return: Breakfast, Lunch, Dinner enumeration

static time_adj(time_am_pm, now=datetime.datetime(2018, 7, 25, 10, 47, 18, 739762))

Given a time calculate how many hours different it is from the current system time :param time_str: HH:MM :param time_am_pm: AM or PM :param now: current time or passed time used for testing :return: int value positive or negative hours different from now()

static time_adj_given_tz(now=datetime.datetime(2018, 7, 25, 10, 47, 18, 739763))

Module contents