Closed varneyo closed 2 years ago
Possibly any attribute on the BaseResource also
def __init__(self, **kwargs):
self.elapsed_time = kwargs.pop("elapsed_time", None)
now = datetime.datetime.utcnow()
self._datetime_created = now
self._datetime_updated = now
self._data = kwargs
Thanks for this! Im going to address this in 3 parts.
All the missing, incorrect types have been fixed in 1c7260c, thanks :). A big problem here is that these type (pyi) files are completely independent of the rust source and are created manually. They're only to inform the IDE and help developers and are hand written. This means the process can be a little error prone - errors or missing fields are not picked up by the rust compiler or part of any part of the workflow. I should probably investigate solutions to automate testing them.
The _data field. I'll investigate the best way of doing this, and will create a seperate issue to track that progress.
The streaming/datetime/snap fields. These are fields that pertain to live data. At some point I should investigate an API for deserialising live from the stream, and at that point can determine if/how to incorporate them. For now that its only historical I don't really have any values to put in them so I'll prob just leave them out and leave the API surface area smaller.
So apologies if this is incorrect as I dont have any clue about rust with python but the following things I have spotted in the bflw file:
Again apologies if none of this makes sense to how rust works with python. below ive made some changes and added some comments. Would be good to see if anything makes sense in changing: