Skip to content

add update_event, support properties and event_type_id on events#135

Merged
mguida22 merged 4 commits intomainfrom
guida/dc-307-support-improved-events-in-python-client
Dec 11, 2025
Merged

add update_event, support properties and event_type_id on events#135
mguida22 merged 4 commits intomainfrom
guida/dc-307-support-improved-events-in-python-client

Conversation

@mguida22
Copy link
Copy Markdown
Member

@mguida22 mguida22 commented Dec 1, 2025

Changelog

Introduces update_event and adds support for event types and event properties to existing event functions.

See event API docs to learn more.

Docs

https://github.com/foxglove/docs/pull/1035/

Description

Adds support for new event API behavior. Events can now belong to an event type and an event can have typed properties, similar to devices.

# create an event with typed properties and specify it's event type
create_event(
    ...
    event_type_id: "evtt_123",
    properties: { "glove_type": "fox", "firmware_version": "1.2.3" },
)

# list all events of the given event type
get_events(
    ...
    event_type_id: "evtt_123",
)

# update an existing event's event type and modify it's properties
update_event(
  ...
  event_type_id: "evtt_456"
  properties: { "glove_type": "fox", "comment": "beep boop", "firmware_version": None },
)

@linear
Copy link
Copy Markdown

linear Bot commented Dec 1, 2025

@wimagguc wimagguc self-requested a review December 4, 2025 14:57
@wimagguc
Copy link
Copy Markdown
Contributor

wimagguc commented Dec 7, 2025

What you have here looks great, but what do you think about adding support for updating an existing event as well? My thinking is that if we're suggesting users to use code to patch events before removing an event type / custom property, then it would be friendlier to support it in the Python package as well.

(I can only find a create_event function here and nothing for patch but maybe I live in la la land and just missed it.)

@mguida22 mguida22 changed the title add support for properties and event_type_id to events add update_event, support properties and event_type_id on events Dec 10, 2025
@mguida22 mguida22 marked this pull request as ready for review December 11, 2025 00:00
@mguida22 mguida22 force-pushed the guida/dc-307-support-improved-events-in-python-client branch from 52e236e to 6d2c565 Compare December 11, 2025 04:31
Copy link
Copy Markdown
Contributor

@wimagguc wimagguc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works like a charm

@mguida22 mguida22 merged commit f5cc335 into main Dec 11, 2025
1 check passed
@mguida22 mguida22 deleted the guida/dc-307-support-improved-events-in-python-client branch December 11, 2025 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants