EventTime

Raphtory’s EventTime. Represents a unique timepoint in the graph’s history as (timestamp, event_id).

  • timestamp: Number of milliseconds since the Unix epoch.
  • event_id: ID used for ordering between equal timestamps.

Unless specified manually, the event ids are generated automatically by Raphtory to maintain a unique ordering of events. EventTime can be converted into a timestamp or a Python datetime, and compared either by timestamp (against ints/floats/datetimes/strings), by tuple of (timestamp, event_id), or against another EventTime.

Properties

PropertyDescription
as_tupleReturn this entry as a tuple of (timestamp, event_id), where the timestamp is in milliseconds.
dtReturns the UTC datetime representation of this EventTime's timestamp.
event_idReturns the event id used to order events within the same timestamp.
tReturns the timestamp in milliseconds since the Unix epoch.

Property Details

as_tuple

Return this entry as a tuple of (timestamp, event_id), where the timestamp is in milliseconds.

Returns

TypeDescription
tuple[int, int](timestamp, event_id).

dt

Returns the UTC datetime representation of this EventTime's timestamp.

Returns

TypeDescription
datetimeThe UTC datetime.

event_id

Returns the event id used to order events within the same timestamp.

Returns

TypeDescription
intThe event id.

t

Returns the timestamp in milliseconds since the Unix epoch.

Returns

TypeDescription
intMilliseconds since the Unix epoch.