models_tdag
mainsequence.client.models_tdag
DataUpdates
Bases: BaseModel
TODO WIP Helper function to work with the table updates
__iter__()
Iterate over keys.
DynamicTableDataSource
Bases: BasePydanticModel
, BaseObjectOrm
coerce_related_resource(value)
Decide if value
should be parsed into a specific subclass
of BaseDataSource. This runs before the standard validation.
model_dump_json(**json_dumps_kwargs)
Dump the current instance to a JSON string,
ensuring that the dependent related_resource
is also properly dumped.
DynamicTableHelpers
get_update_statistics(hash_id)
Gets latest value from Hash_id
LocalTimeSerie
Bases: BasePydanticModel
, BaseObjectOrm
get_data_between_dates_from_api(start_date, end_date, great_or_equal, less_or_equal, unique_identifier_list, columns, unique_identifier_range_map)
Helper function to make a single batch request (or multiple paged requests if next_offset).
get_metadatas_and_set_updates(local_time_series_ids, update_details_kwargs, update_priority_dict)
classmethod
{'local_hash_id__in': [{'local_hash_id': 'alpacaequitybarstest_97018e7280c1bad321b3f4153cc7e986', 'data_source_id': 1}, :param local_hash_id__in: :param multi_index_asset_symbols_filter: :param update_details_kwargs: :param update_priority_dict: :return:
post_data_frame_in_chunks(serialized_data_frame, chunk_size=50000, local_metadata=None, data_source=None, index_names=None, time_index_name='timestamp', overwrite=False)
classmethod
Sends a large DataFrame to a Django backend in multiple chunks.
:param serialized_data_frame: The DataFrame to upload. :param url: The endpoint URL (e.g. https://yourapi.com/upload-chunk/). :param chunk_size: Number of rows per chunk. :param local_metadata: General metadata dict you want to send with each chunk. :param data_source: Additional info about the source of the data. :param index_names: Index columns in the DataFrame. :param time_index_name: The column name used for time indexing. :param overwrite: Boolean indicating whether existing data should be overwritten.
verify_if_direct_dependencies_are_updated()
Response({ "error_on_update_dependencies": False, "updated": all_success, })
Scheduler
Bases: BasePydanticModel
, BaseObjectOrm
stop_heart_beat()
Stop the heartbeat gracefully.
SourceTableConfiguration
Bases: BasePydanticModel
, BaseObjectOrm
patch_column_metadata(column_metadata)
none_if_backend_detached(func)
Decorator that evaluates BACKEND_DETACHED before executing the function. If BACKEND_DETACHED() returns True, the function is skipped, and None is returned. Otherwise, the function is executed as normal.
It supports regular functions, property methods, classmethods, and staticmethods.