Class reference
Reference for returned classes from some functions. These are not intended to be created by the user.
Watches
ItemNoUpdateWatch
ItemNoChangeWatch
InstantView
- class InstantView(instant)
- classmethod now()
Create a new instance with the current time
- Return type:
- delta_now(now=None)
Return the delta between now and the instant. The delta will be positive, e.g. if the InstantView is from 5 seconds ago this will return a timedelta with 5 seconds.
- Parameters:
now (
InstantView
|Instant
|None
) – optional instant to compare to instead of now, must be newer than the instant of the instant view- Return type:
- newer_than(obj=None, **kwargs)
Check if the instant is newer than the given value
- older_than(obj=None, **kwargs)
Check if the instant is older than the given value
- py_timedelta(now=None)
Return the timedelta between the instant and now
- Parameters:
now (
InstantView
|Instant
|None
) – optional instant to compare to- Return type: