pydantic
Data parsing and validation using Python type hints
... a default, it is not required. signup_ts is a datetime field which is not required (and takes the value None if it's not supplied). pydantic will process either a unix timestamp int (e.g. 1496498400) or a string representing the date & time. friends uses python's typing system, and requires a list of integers. As with id, integer-like objects will be converted to integers.