py_alpaca_api.models.account_model
Attributes
Classes
Functions
|
Extracts and processes data from a dictionary based on a given data class and field processors. |
|
Converts a dictionary into an instance of the AccountModel. |
Module Contents
- py_alpaca_api.models.account_model.extract_class_data(data_dict: dict, field_processors: dict, data_class: type[Any])[source]
Extracts and processes data from a dictionary based on a given data class and field processors.
- Parameters:
- Returns:
A dictionary containing processed data, with keys corresponding to the fields of the data class.
- Return type:
- Raises:
KeyError – When a field processor is not found for a specific data type.
- class py_alpaca_api.models.account_model.AccountModel[source]
-
- created_at: datetime.datetime[source]
- py_alpaca_api.models.account_model.account_class_from_dict(data_dict: dict) AccountModel[source]
Converts a dictionary into an instance of the AccountModel.
- Parameters:
data_dict (dict) – A dictionary containing the data for the AccountModel instance.
- Returns:
An instance of the AccountModel created from the provided dictionary.
- Return type: