stac-pydantic
stac-pydantic copied to clipboard
investigate arrow for storing datetimes
arrow is an interesting library. It could give us a more generic datetime representation that would let us support all the flavors of RFC3339 without a lot of work. Need to know more about how it plays with FastAPI.
It duck types datetime https://github.com/arrow-py/arrow/blob/master/arrow/arrow.py#L83-L84. This should work.
pendulum looks interesting too https://github.com/sdispater/pendulum - thanks @kylebarron. Interesting that pendulum subclasses datetime while arrow duck types it.
I haven't looked too closely at either to understand the implications, but naively it seems like being able to call isinstance and use it like a datetime would be a plus.