py_alpaca_api.models.clock_model ================================ .. py:module:: py_alpaca_api.models.clock_model Attributes ---------- .. autoapisummary:: py_alpaca_api.models.clock_model.KEY_PROCESSORS Classes ------- .. autoapisummary:: py_alpaca_api.models.clock_model.ClockModel Functions --------- .. autoapisummary:: py_alpaca_api.models.clock_model.extract_class_data py_alpaca_api.models.clock_model.clock_class_from_dict Module Contents --------------- .. py:data:: KEY_PROCESSORS .. py:function:: extract_class_data(data_dict: dict, field_processors: dict, data_class: type[Any]) Extracts and processes data from a dictionary based on a given data class and field processors. :param data_dict: The dictionary containing the data to be processed. :type data_dict: dict :param field_processors: A dictionary of field processors. :type field_processors: Dict :param data_class: The data class used to define the fields and types. :type data_class: type[Any] :returns: A dictionary containing processed data, with keys corresponding to the fields of the data class. :rtype: dict :raises KeyError: When a field processor is not found for a specific data type. .. py:class:: ClockModel .. py:attribute:: market_time :type: datetime.datetime .. py:attribute:: is_open :type: bool .. py:attribute:: next_open :type: datetime.datetime .. py:attribute:: next_close :type: datetime.datetime .. py:function:: clock_class_from_dict(data_dict: dict) -> ClockModel Create ClockModel from dictionary data. :param data_dict: A dictionary containing data for creating an instance of `ClockModel`. :returns: An instance of `ClockModel` created using the data from `data_dict`. :raises None.: