Event
Create an event.
def Event(
type: string,
_fields: dict = None,
__dict__: callable = dict,
__now__: callable = time.time,
**fields: any
) - > dict
Create an event.
Parameters
| Name | Type | Description |
|---|---|---|
| type | string | The category or name of the event being recorded. |
| _fields | dict = None | An optional dictionary of initial event data to be merged. |
| dict | callable = dict | The dictionary constructor or factory function used to instantiate the event object. |
| now | callable = time.time | A function that returns the current time, used to populate the timestamp if it is missing. |
| **fields | any | Additional keyword arguments to be included as fields in the event dictionary. |
Returns
| Type | Description |
|---|---|
dict | A dictionary representing the event, containing the specified type, fields, and a timestamp. |