foxglove-sdk 0.15.1__cp39-cp39-win_amd64.whl → 0.15.2__cp39-cp39-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of foxglove-sdk might be problematic. Click here for more details.

@@ -1,321 +1,321 @@
1
- from enum import Enum
2
-
3
- from foxglove import Schema
4
- from foxglove.websocket import (
5
- AnyNativeParameterValue,
6
- AnyParameterValue,
7
- ServiceHandler,
8
- )
9
-
10
- class Capability(Enum):
11
- """
12
- An enumeration of capabilities that the websocket server can advertise to its clients.
13
- """
14
-
15
- ClientPublish = ...
16
- """Allow clients to advertise channels to send data messages to the server."""
17
-
18
- ConnectionGraph = ...
19
- """Allow clients to subscribe and make connection graph updates"""
20
-
21
- Parameters = ...
22
- """Allow clients to get & set parameters."""
23
-
24
- Services = ...
25
- """Allow clients to call services."""
26
-
27
- Time = ...
28
- """Inform clients about the latest server time."""
29
-
30
- class Client:
31
- """
32
- A client that is connected to a running websocket server.
33
- """
34
-
35
- id: int = ...
36
-
37
- class ChannelView:
38
- """
39
- Information about a channel.
40
- """
41
-
42
- id: int = ...
43
- topic: str = ...
44
-
45
- class ClientChannel:
46
- """
47
- Information about a channel advertised by a client.
48
- """
49
-
50
- id: int = ...
51
- topic: str = ...
52
- encoding: str = ...
53
- schema_name: str = ...
54
- schema_encoding: str | None = ...
55
- schema: bytes | None = ...
56
-
57
- class ConnectionGraph:
58
- """
59
- A graph of connections between clients.
60
- """
61
-
62
- def __init__(self) -> None: ...
63
- def set_published_topic(self, topic: str, publisher_ids: list[str]) -> None:
64
- """
65
- Set a published topic and its associated publisher ids. Overwrites any existing topic with
66
- the same name.
67
-
68
- :param topic: The topic name.
69
- :param publisher_ids: The set of publisher ids.
70
- """
71
- ...
72
-
73
- def set_subscribed_topic(self, topic: str, subscriber_ids: list[str]) -> None:
74
- """
75
- Set a subscribed topic and its associated subscriber ids. Overwrites any existing topic with
76
- the same name.
77
-
78
- :param topic: The topic name.
79
- :param subscriber_ids: The set of subscriber ids.
80
- """
81
- ...
82
-
83
- def set_advertised_service(self, service: str, provider_ids: list[str]) -> None:
84
- """
85
- Set an advertised service and its associated provider ids Overwrites any existing service
86
- with the same name.
87
-
88
- :param service: The service name.
89
- :param provider_ids: The set of provider ids.
90
- """
91
- ...
92
-
93
- class MessageSchema:
94
- """
95
- A service request or response schema.
96
- """
97
-
98
- encoding: str
99
- schema: Schema
100
-
101
- def __init__(
102
- self,
103
- *,
104
- encoding: str,
105
- schema: Schema,
106
- ) -> None: ...
107
-
108
- class Parameter:
109
- """
110
- A parameter which can be sent to a client.
111
-
112
- :param name: The parameter name.
113
- :type name: str
114
- :param value: Optional value, represented as a native python object, or a ParameterValue.
115
- :type value: None|bool|int|float|str|bytes|list|dict|ParameterValue
116
- :param type: Optional parameter type. This is automatically derived when passing a native
117
- python object as the value.
118
- :type type: ParameterType|None
119
- """
120
-
121
- name: str
122
- type: ParameterType | None
123
- value: AnyParameterValue | None
124
-
125
- def __init__(
126
- self,
127
- name: str,
128
- *,
129
- value: AnyNativeParameterValue | None = None,
130
- type: ParameterType | None = None,
131
- ) -> None: ...
132
- def get_value(self) -> AnyNativeParameterValue | None:
133
- """Returns the parameter value as a native python object."""
134
- ...
135
-
136
- class ParameterType(Enum):
137
- """
138
- The type of a parameter.
139
- """
140
-
141
- ByteArray = ...
142
- """A byte array."""
143
-
144
- Float64 = ...
145
- """A floating-point value that can be represented as a `float64`."""
146
-
147
- Float64Array = ...
148
- """An array of floating-point values that can be represented as `float64`s."""
149
-
150
- class ParameterValue:
151
- """
152
- A parameter value.
153
- """
154
-
155
- class Integer:
156
- """An integer value."""
157
-
158
- def __init__(self, value: int) -> None: ...
159
-
160
- class Bool:
161
- """A boolean value."""
162
-
163
- def __init__(self, value: bool) -> None: ...
164
-
165
- class Float64:
166
- """A floating-point value."""
167
-
168
- def __init__(self, value: float) -> None: ...
169
-
170
- class String:
171
- """
172
- A string value.
173
-
174
- For parameters of type :py:attr:ParameterType.ByteArray, this is a
175
- base64 encoding of the byte array.
176
- """
177
-
178
- def __init__(self, value: str) -> None: ...
179
-
180
- class Array:
181
- """An array of parameter values."""
182
-
183
- def __init__(self, value: list[AnyParameterValue]) -> None: ...
184
-
185
- class Dict:
186
- """An associative map of parameter values."""
187
-
188
- def __init__(self, value: dict[str, AnyParameterValue]) -> None: ...
189
-
190
- class ServiceRequest:
191
- """
192
- A websocket service request.
193
- """
194
-
195
- service_name: str
196
- client_id: int
197
- call_id: int
198
- encoding: str
199
- payload: bytes
200
-
201
- class Service:
202
- """
203
- A websocket service.
204
- """
205
-
206
- name: str
207
- schema: ServiceSchema
208
- handler: ServiceHandler
209
-
210
- def __init__(
211
- self,
212
- *,
213
- name: str,
214
- schema: ServiceSchema,
215
- handler: ServiceHandler,
216
- ): ...
217
-
218
- class ServiceSchema:
219
- """
220
- A websocket service schema.
221
- """
222
-
223
- name: str
224
- request: MessageSchema | None
225
- response: MessageSchema | None
226
-
227
- def __init__(
228
- self,
229
- *,
230
- name: str,
231
- request: MessageSchema | None = None,
232
- response: MessageSchema | None = None,
233
- ): ...
234
-
235
- class StatusLevel(Enum):
236
- """A level for `WebSocketServer.publish_status`"""
237
-
238
- Info = ...
239
- Warning = ...
240
- Error = ...
241
-
242
- class WebSocketServer:
243
- """
244
- A websocket server for live visualization.
245
- """
246
-
247
- def __init__(self) -> None: ...
248
- @property
249
- def port(self) -> int:
250
- """Get the port on which the server is listening."""
251
- ...
252
-
253
- def app_url(
254
- self,
255
- *,
256
- layout_id: str | None = None,
257
- open_in_desktop: bool = False,
258
- ) -> str | None:
259
- """
260
- Returns a web app URL to open the websocket as a data source.
261
-
262
- Returns None if the server has been stopped.
263
-
264
- :param layout_id: An optional layout ID to include in the URL.
265
- :param open_in_desktop: Opens the foxglove desktop app.
266
- """
267
- ...
268
-
269
- def stop(self) -> None:
270
- """Explicitly stop the server."""
271
- ...
272
-
273
- def clear_session(self, session_id: str | None = None) -> None:
274
- """
275
- Sets a new session ID and notifies all clients, causing them to reset their state.
276
- If no session ID is provided, generates a new one based on the current timestamp.
277
- If the server has been stopped, this has no effect.
278
- """
279
- ...
280
-
281
- def broadcast_time(self, timestamp_nanos: int) -> None:
282
- """
283
- Publishes the current server timestamp to all clients.
284
- If the server has been stopped, this has no effect.
285
- """
286
- ...
287
-
288
- def publish_parameter_values(self, parameters: list[Parameter]) -> None:
289
- """Publishes parameter values to all subscribed clients."""
290
- ...
291
-
292
- def publish_status(
293
- self, message: str, level: StatusLevel, id: str | None = None
294
- ) -> None:
295
- """
296
- Send a status message to all clients. If the server has been stopped, this has no effect.
297
- """
298
- ...
299
-
300
- def remove_status(self, ids: list[str]) -> None:
301
- """
302
- Remove status messages by id from all clients. If the server has been stopped, this has no
303
- effect.
304
- """
305
- ...
306
-
307
- def add_services(self, services: list[Service]) -> None:
308
- """Add services to the server."""
309
- ...
310
-
311
- def remove_services(self, names: list[str]) -> None:
312
- """Removes services that were previously advertised."""
313
- ...
314
-
315
- def publish_connection_graph(self, graph: ConnectionGraph) -> None:
316
- """
317
- Publishes a connection graph update to all subscribed clients. An update is published to
318
- clients as a difference from the current graph to the replacement graph. When a client first
319
- subscribes to connection graph updates, it receives the current graph.
320
- """
321
- ...
1
+ from enum import Enum
2
+
3
+ from foxglove import Schema
4
+ from foxglove.websocket import (
5
+ AnyNativeParameterValue,
6
+ AnyParameterValue,
7
+ ServiceHandler,
8
+ )
9
+
10
+ class Capability(Enum):
11
+ """
12
+ An enumeration of capabilities that the websocket server can advertise to its clients.
13
+ """
14
+
15
+ ClientPublish = ...
16
+ """Allow clients to advertise channels to send data messages to the server."""
17
+
18
+ ConnectionGraph = ...
19
+ """Allow clients to subscribe and make connection graph updates"""
20
+
21
+ Parameters = ...
22
+ """Allow clients to get & set parameters."""
23
+
24
+ Services = ...
25
+ """Allow clients to call services."""
26
+
27
+ Time = ...
28
+ """Inform clients about the latest server time."""
29
+
30
+ class Client:
31
+ """
32
+ A client that is connected to a running websocket server.
33
+ """
34
+
35
+ id: int = ...
36
+
37
+ class ChannelView:
38
+ """
39
+ Information about a channel.
40
+ """
41
+
42
+ id: int = ...
43
+ topic: str = ...
44
+
45
+ class ClientChannel:
46
+ """
47
+ Information about a channel advertised by a client.
48
+ """
49
+
50
+ id: int = ...
51
+ topic: str = ...
52
+ encoding: str = ...
53
+ schema_name: str = ...
54
+ schema_encoding: str | None = ...
55
+ schema: bytes | None = ...
56
+
57
+ class ConnectionGraph:
58
+ """
59
+ A graph of connections between clients.
60
+ """
61
+
62
+ def __init__(self) -> None: ...
63
+ def set_published_topic(self, topic: str, publisher_ids: list[str]) -> None:
64
+ """
65
+ Set a published topic and its associated publisher ids. Overwrites any existing topic with
66
+ the same name.
67
+
68
+ :param topic: The topic name.
69
+ :param publisher_ids: The set of publisher ids.
70
+ """
71
+ ...
72
+
73
+ def set_subscribed_topic(self, topic: str, subscriber_ids: list[str]) -> None:
74
+ """
75
+ Set a subscribed topic and its associated subscriber ids. Overwrites any existing topic with
76
+ the same name.
77
+
78
+ :param topic: The topic name.
79
+ :param subscriber_ids: The set of subscriber ids.
80
+ """
81
+ ...
82
+
83
+ def set_advertised_service(self, service: str, provider_ids: list[str]) -> None:
84
+ """
85
+ Set an advertised service and its associated provider ids Overwrites any existing service
86
+ with the same name.
87
+
88
+ :param service: The service name.
89
+ :param provider_ids: The set of provider ids.
90
+ """
91
+ ...
92
+
93
+ class MessageSchema:
94
+ """
95
+ A service request or response schema.
96
+ """
97
+
98
+ encoding: str
99
+ schema: Schema
100
+
101
+ def __init__(
102
+ self,
103
+ *,
104
+ encoding: str,
105
+ schema: Schema,
106
+ ) -> None: ...
107
+
108
+ class Parameter:
109
+ """
110
+ A parameter which can be sent to a client.
111
+
112
+ :param name: The parameter name.
113
+ :type name: str
114
+ :param value: Optional value, represented as a native python object, or a ParameterValue.
115
+ :type value: None|bool|int|float|str|bytes|list|dict|ParameterValue
116
+ :param type: Optional parameter type. This is automatically derived when passing a native
117
+ python object as the value.
118
+ :type type: ParameterType|None
119
+ """
120
+
121
+ name: str
122
+ type: ParameterType | None
123
+ value: AnyParameterValue | None
124
+
125
+ def __init__(
126
+ self,
127
+ name: str,
128
+ *,
129
+ value: AnyNativeParameterValue | None = None,
130
+ type: ParameterType | None = None,
131
+ ) -> None: ...
132
+ def get_value(self) -> AnyNativeParameterValue | None:
133
+ """Returns the parameter value as a native python object."""
134
+ ...
135
+
136
+ class ParameterType(Enum):
137
+ """
138
+ The type of a parameter.
139
+ """
140
+
141
+ ByteArray = ...
142
+ """A byte array."""
143
+
144
+ Float64 = ...
145
+ """A floating-point value that can be represented as a `float64`."""
146
+
147
+ Float64Array = ...
148
+ """An array of floating-point values that can be represented as `float64`s."""
149
+
150
+ class ParameterValue:
151
+ """
152
+ A parameter value.
153
+ """
154
+
155
+ class Integer:
156
+ """An integer value."""
157
+
158
+ def __init__(self, value: int) -> None: ...
159
+
160
+ class Bool:
161
+ """A boolean value."""
162
+
163
+ def __init__(self, value: bool) -> None: ...
164
+
165
+ class Float64:
166
+ """A floating-point value."""
167
+
168
+ def __init__(self, value: float) -> None: ...
169
+
170
+ class String:
171
+ """
172
+ A string value.
173
+
174
+ For parameters of type :py:attr:ParameterType.ByteArray, this is a
175
+ base64 encoding of the byte array.
176
+ """
177
+
178
+ def __init__(self, value: str) -> None: ...
179
+
180
+ class Array:
181
+ """An array of parameter values."""
182
+
183
+ def __init__(self, value: list[AnyParameterValue]) -> None: ...
184
+
185
+ class Dict:
186
+ """An associative map of parameter values."""
187
+
188
+ def __init__(self, value: dict[str, AnyParameterValue]) -> None: ...
189
+
190
+ class ServiceRequest:
191
+ """
192
+ A websocket service request.
193
+ """
194
+
195
+ service_name: str
196
+ client_id: int
197
+ call_id: int
198
+ encoding: str
199
+ payload: bytes
200
+
201
+ class Service:
202
+ """
203
+ A websocket service.
204
+ """
205
+
206
+ name: str
207
+ schema: ServiceSchema
208
+ handler: ServiceHandler
209
+
210
+ def __init__(
211
+ self,
212
+ *,
213
+ name: str,
214
+ schema: ServiceSchema,
215
+ handler: ServiceHandler,
216
+ ): ...
217
+
218
+ class ServiceSchema:
219
+ """
220
+ A websocket service schema.
221
+ """
222
+
223
+ name: str
224
+ request: MessageSchema | None
225
+ response: MessageSchema | None
226
+
227
+ def __init__(
228
+ self,
229
+ *,
230
+ name: str,
231
+ request: MessageSchema | None = None,
232
+ response: MessageSchema | None = None,
233
+ ): ...
234
+
235
+ class StatusLevel(Enum):
236
+ """A level for `WebSocketServer.publish_status`"""
237
+
238
+ Info = ...
239
+ Warning = ...
240
+ Error = ...
241
+
242
+ class WebSocketServer:
243
+ """
244
+ A websocket server for live visualization.
245
+ """
246
+
247
+ def __init__(self) -> None: ...
248
+ @property
249
+ def port(self) -> int:
250
+ """Get the port on which the server is listening."""
251
+ ...
252
+
253
+ def app_url(
254
+ self,
255
+ *,
256
+ layout_id: str | None = None,
257
+ open_in_desktop: bool = False,
258
+ ) -> str | None:
259
+ """
260
+ Returns a web app URL to open the websocket as a data source.
261
+
262
+ Returns None if the server has been stopped.
263
+
264
+ :param layout_id: An optional layout ID to include in the URL.
265
+ :param open_in_desktop: Opens the foxglove desktop app.
266
+ """
267
+ ...
268
+
269
+ def stop(self) -> None:
270
+ """Explicitly stop the server."""
271
+ ...
272
+
273
+ def clear_session(self, session_id: str | None = None) -> None:
274
+ """
275
+ Sets a new session ID and notifies all clients, causing them to reset their state.
276
+ If no session ID is provided, generates a new one based on the current timestamp.
277
+ If the server has been stopped, this has no effect.
278
+ """
279
+ ...
280
+
281
+ def broadcast_time(self, timestamp_nanos: int) -> None:
282
+ """
283
+ Publishes the current server timestamp to all clients.
284
+ If the server has been stopped, this has no effect.
285
+ """
286
+ ...
287
+
288
+ def publish_parameter_values(self, parameters: list[Parameter]) -> None:
289
+ """Publishes parameter values to all subscribed clients."""
290
+ ...
291
+
292
+ def publish_status(
293
+ self, message: str, level: StatusLevel, id: str | None = None
294
+ ) -> None:
295
+ """
296
+ Send a status message to all clients. If the server has been stopped, this has no effect.
297
+ """
298
+ ...
299
+
300
+ def remove_status(self, ids: list[str]) -> None:
301
+ """
302
+ Remove status messages by id from all clients. If the server has been stopped, this has no
303
+ effect.
304
+ """
305
+ ...
306
+
307
+ def add_services(self, services: list[Service]) -> None:
308
+ """Add services to the server."""
309
+ ...
310
+
311
+ def remove_services(self, names: list[str]) -> None:
312
+ """Removes services that were previously advertised."""
313
+ ...
314
+
315
+ def publish_connection_graph(self, graph: ConnectionGraph) -> None:
316
+ """
317
+ Publishes a connection graph update to all subscribed clients. An update is published to
318
+ clients as a difference from the current graph to the replacement graph. When a client first
319
+ subscribes to connection graph updates, it receives the current graph.
320
+ """
321
+ ...
Binary file