foxglove-sdk 0.6.2__cp312-cp312-win32.whl → 0.16.6__cp312-cp312-win32.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.
- foxglove/__init__.py +241 -121
- foxglove/_foxglove_py/__init__.pyi +233 -136
- foxglove/_foxglove_py/channels.pyi +2860 -1053
- foxglove/_foxglove_py/cloud.pyi +9 -0
- foxglove/_foxglove_py/mcap.pyi +125 -0
- foxglove/_foxglove_py/schemas.pyi +1037 -666
- foxglove/_foxglove_py/schemas_wkt.pyi +85 -77
- foxglove/_foxglove_py/websocket.pyi +394 -297
- foxglove/_foxglove_py.cp312-win32.pyd +0 -0
- foxglove/benchmarks/test_mcap_serialization.py +160 -161
- foxglove/channel.py +241 -204
- foxglove/channels/__init__.py +96 -72
- foxglove/cloud.py +61 -0
- foxglove/layouts/__init__.py +17 -0
- foxglove/mcap.py +12 -0
- foxglove/notebook/__init__.py +0 -0
- foxglove/notebook/foxglove_widget.py +82 -0
- foxglove/notebook/notebook_buffer.py +114 -0
- foxglove/notebook/static/widget.js +1 -0
- foxglove/schemas/__init__.py +166 -149
- foxglove/tests/test_channel.py +243 -142
- foxglove/tests/test_context.py +10 -0
- foxglove/tests/test_logging.py +62 -16
- foxglove/tests/test_mcap.py +477 -46
- foxglove/tests/test_parameters.py +178 -0
- foxglove/tests/test_schemas.py +17 -0
- foxglove/tests/test_server.py +141 -68
- foxglove/tests/test_time.py +137 -137
- foxglove/websocket.py +220 -172
- foxglove_sdk-0.16.6.dist-info/METADATA +53 -0
- foxglove_sdk-0.16.6.dist-info/RECORD +34 -0
- {foxglove_sdk-0.6.2.dist-info → foxglove_sdk-0.16.6.dist-info}/WHEEL +1 -1
- foxglove_sdk-0.6.2.dist-info/METADATA +0 -51
- foxglove_sdk-0.6.2.dist-info/RECORD +0 -22
foxglove/websocket.py
CHANGED
|
@@ -1,172 +1,220 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
from
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
:param
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
"""
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
) ->
|
|
85
|
-
"""
|
|
86
|
-
Called by the server when a client
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
"""
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
param_names:
|
|
118
|
-
|
|
119
|
-
"""
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
:param
|
|
139
|
-
"""
|
|
140
|
-
return
|
|
141
|
-
|
|
142
|
-
def
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Callable
|
|
4
|
+
from typing import Optional, Protocol, TypeAlias, Union
|
|
5
|
+
|
|
6
|
+
from ._foxglove_py.websocket import (
|
|
7
|
+
Capability,
|
|
8
|
+
ChannelView,
|
|
9
|
+
Client,
|
|
10
|
+
ClientChannel,
|
|
11
|
+
ConnectionGraph,
|
|
12
|
+
MessageSchema,
|
|
13
|
+
Parameter,
|
|
14
|
+
ParameterType,
|
|
15
|
+
ParameterValue,
|
|
16
|
+
PlaybackCommand,
|
|
17
|
+
PlaybackControlRequest,
|
|
18
|
+
PlaybackState,
|
|
19
|
+
PlaybackStatus,
|
|
20
|
+
Service,
|
|
21
|
+
ServiceRequest,
|
|
22
|
+
ServiceSchema,
|
|
23
|
+
StatusLevel,
|
|
24
|
+
WebSocketServer,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
ServiceHandler: TypeAlias = Callable[[ServiceRequest], bytes]
|
|
28
|
+
AssetHandler: TypeAlias = Callable[[str], "bytes | None"]
|
|
29
|
+
AnyParameterValue: TypeAlias = Union[
|
|
30
|
+
ParameterValue.Integer,
|
|
31
|
+
ParameterValue.Bool,
|
|
32
|
+
ParameterValue.Float64,
|
|
33
|
+
ParameterValue.String,
|
|
34
|
+
ParameterValue.Array,
|
|
35
|
+
ParameterValue.Dict,
|
|
36
|
+
]
|
|
37
|
+
AnyInnerParameterValue: TypeAlias = Union[
|
|
38
|
+
AnyParameterValue,
|
|
39
|
+
bool,
|
|
40
|
+
int,
|
|
41
|
+
float,
|
|
42
|
+
str,
|
|
43
|
+
"list[AnyInnerParameterValue]",
|
|
44
|
+
"dict[str, AnyInnerParameterValue]",
|
|
45
|
+
]
|
|
46
|
+
AnyNativeParameterValue: TypeAlias = Union[
|
|
47
|
+
AnyInnerParameterValue,
|
|
48
|
+
bytes,
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class ServerListener(Protocol):
|
|
53
|
+
"""
|
|
54
|
+
A mechanism to register callbacks for handling client message events.
|
|
55
|
+
"""
|
|
56
|
+
|
|
57
|
+
def on_subscribe(self, client: Client, channel: ChannelView) -> None:
|
|
58
|
+
"""
|
|
59
|
+
Called by the server when a client subscribes to a channel.
|
|
60
|
+
|
|
61
|
+
:param client: The client (id) that sent the message.
|
|
62
|
+
:param channel: The channel (id, topic) that the message was sent on.
|
|
63
|
+
"""
|
|
64
|
+
return None
|
|
65
|
+
|
|
66
|
+
def on_unsubscribe(self, client: Client, channel: ChannelView) -> None:
|
|
67
|
+
"""
|
|
68
|
+
Called by the server when a client unsubscribes from a channel or disconnects.
|
|
69
|
+
|
|
70
|
+
:param client: The client (id) that sent the message.
|
|
71
|
+
:param channel: The channel (id, topic) that the message was sent on.
|
|
72
|
+
"""
|
|
73
|
+
return None
|
|
74
|
+
|
|
75
|
+
def on_client_advertise(self, client: Client, channel: ClientChannel) -> None:
|
|
76
|
+
"""
|
|
77
|
+
Called by the server when a client advertises a channel.
|
|
78
|
+
|
|
79
|
+
:param client: The client (id) that sent the message.
|
|
80
|
+
:param channel: The client channel that is being advertised.
|
|
81
|
+
"""
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
def on_client_unadvertise(self, client: Client, client_channel_id: int) -> None:
|
|
85
|
+
"""
|
|
86
|
+
Called by the server when a client unadvertises a channel.
|
|
87
|
+
|
|
88
|
+
:param client: The client (id) that is unadvertising the channel.
|
|
89
|
+
:param client_channel_id: The client channel id that is being unadvertised.
|
|
90
|
+
"""
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
def on_message_data(
|
|
94
|
+
self, client: Client, client_channel_id: int, data: bytes
|
|
95
|
+
) -> None:
|
|
96
|
+
"""
|
|
97
|
+
Called by the server when a message is received from a client.
|
|
98
|
+
|
|
99
|
+
:param client: The client (id) that sent the message.
|
|
100
|
+
:param client_channel_id: The client channel id that the message was sent on.
|
|
101
|
+
:param data: The message data.
|
|
102
|
+
"""
|
|
103
|
+
return None
|
|
104
|
+
|
|
105
|
+
def on_get_parameters(
|
|
106
|
+
self,
|
|
107
|
+
client: Client,
|
|
108
|
+
param_names: list[str],
|
|
109
|
+
request_id: str | None = None,
|
|
110
|
+
) -> list[Parameter]:
|
|
111
|
+
"""
|
|
112
|
+
Called by the server when a client requests parameters.
|
|
113
|
+
|
|
114
|
+
Requires :py:data:`Capability.Parameters`.
|
|
115
|
+
|
|
116
|
+
:param client: The client (id) that sent the message.
|
|
117
|
+
:param param_names: The names of the parameters to get.
|
|
118
|
+
:param request_id: An optional request id.
|
|
119
|
+
"""
|
|
120
|
+
return []
|
|
121
|
+
|
|
122
|
+
def on_set_parameters(
|
|
123
|
+
self,
|
|
124
|
+
client: Client,
|
|
125
|
+
parameters: list[Parameter],
|
|
126
|
+
request_id: str | None = None,
|
|
127
|
+
) -> list[Parameter]:
|
|
128
|
+
"""
|
|
129
|
+
Called by the server when a client sets parameters.
|
|
130
|
+
Note that only `parameters` which have changed are included in the callback, but the return
|
|
131
|
+
value must include all parameters. If a parameter that is unset is included in the return
|
|
132
|
+
value, it will not be published to clients.
|
|
133
|
+
|
|
134
|
+
Requires :py:data:`Capability.Parameters`.
|
|
135
|
+
|
|
136
|
+
:param client: The client (id) that sent the message.
|
|
137
|
+
:param parameters: The parameters to set.
|
|
138
|
+
:param request_id: An optional request id.
|
|
139
|
+
"""
|
|
140
|
+
return parameters
|
|
141
|
+
|
|
142
|
+
def on_parameters_subscribe(
|
|
143
|
+
self,
|
|
144
|
+
param_names: list[str],
|
|
145
|
+
) -> None:
|
|
146
|
+
"""
|
|
147
|
+
Called by the server when a client subscribes to one or more parameters for the first time.
|
|
148
|
+
|
|
149
|
+
Requires :py:data:`Capability.Parameters`.
|
|
150
|
+
|
|
151
|
+
:param param_names: The names of the parameters to subscribe to.
|
|
152
|
+
"""
|
|
153
|
+
return None
|
|
154
|
+
|
|
155
|
+
def on_parameters_unsubscribe(
|
|
156
|
+
self,
|
|
157
|
+
param_names: list[str],
|
|
158
|
+
) -> None:
|
|
159
|
+
"""
|
|
160
|
+
Called by the server when the last client subscription to one or more parameters has been
|
|
161
|
+
removed.
|
|
162
|
+
|
|
163
|
+
Requires :py:data:`Capability.Parameters`.
|
|
164
|
+
|
|
165
|
+
:param param_names: The names of the parameters to unsubscribe from.
|
|
166
|
+
"""
|
|
167
|
+
return None
|
|
168
|
+
|
|
169
|
+
def on_connection_graph_subscribe(self) -> None:
|
|
170
|
+
"""
|
|
171
|
+
Called by the server when the first client subscribes to the connection graph.
|
|
172
|
+
"""
|
|
173
|
+
return None
|
|
174
|
+
|
|
175
|
+
def on_connection_graph_unsubscribe(self) -> None:
|
|
176
|
+
"""
|
|
177
|
+
Called by the server when the last client unsubscribes from the connection graph.
|
|
178
|
+
"""
|
|
179
|
+
return None
|
|
180
|
+
|
|
181
|
+
def on_playback_control_request(
|
|
182
|
+
self, playback_control_request: PlaybackControlRequest
|
|
183
|
+
) -> Optional[PlaybackState]:
|
|
184
|
+
"""
|
|
185
|
+
Called by the server when it receives an updated player state from the client.
|
|
186
|
+
|
|
187
|
+
Requires :py:data:`Capability.RangedPlayback`.
|
|
188
|
+
|
|
189
|
+
:meta private:
|
|
190
|
+
:param playback_control_request: The playback control request sent from the client
|
|
191
|
+
"""
|
|
192
|
+
return None
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
__all__ = [
|
|
196
|
+
"AnyInnerParameterValue",
|
|
197
|
+
"AnyNativeParameterValue",
|
|
198
|
+
"AnyParameterValue",
|
|
199
|
+
"AssetHandler",
|
|
200
|
+
"Capability",
|
|
201
|
+
"ChannelView",
|
|
202
|
+
"Client",
|
|
203
|
+
"ClientChannel",
|
|
204
|
+
"ConnectionGraph",
|
|
205
|
+
"MessageSchema",
|
|
206
|
+
"Parameter",
|
|
207
|
+
"ParameterType",
|
|
208
|
+
"ParameterValue",
|
|
209
|
+
"PlaybackCommand",
|
|
210
|
+
"PlaybackControlRequest",
|
|
211
|
+
"PlaybackState",
|
|
212
|
+
"PlaybackStatus",
|
|
213
|
+
"ServerListener",
|
|
214
|
+
"Service",
|
|
215
|
+
"ServiceHandler",
|
|
216
|
+
"ServiceRequest",
|
|
217
|
+
"ServiceSchema",
|
|
218
|
+
"StatusLevel",
|
|
219
|
+
"WebSocketServer",
|
|
220
|
+
]
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: foxglove-sdk
|
|
3
|
+
Version: 0.16.6
|
|
4
|
+
Classifier: Programming Language :: Python :: 3
|
|
5
|
+
Classifier: Programming Language :: Rust
|
|
6
|
+
Requires-Dist: anywidget ; extra == 'notebook'
|
|
7
|
+
Requires-Dist: mcap ; extra == 'notebook'
|
|
8
|
+
Requires-Dist: traitlets ; extra == 'notebook'
|
|
9
|
+
Provides-Extra: notebook
|
|
10
|
+
Summary: Foxglove Python SDK
|
|
11
|
+
Author-email: Foxglove <support@foxglove.dev>
|
|
12
|
+
License-Expression: MIT
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
15
|
+
Project-URL: documentation, https://docs.foxglove.dev/
|
|
16
|
+
Project-URL: repository, https://github.com/foxglove/foxglove-sdk
|
|
17
|
+
|
|
18
|
+
# Foxglove Python SDK
|
|
19
|
+
|
|
20
|
+
The official [Foxglove](https://docs.foxglove.dev/docs) SDK for Python.
|
|
21
|
+
|
|
22
|
+
This package provides support for integrating with the Foxglove platform. It can be used to log
|
|
23
|
+
events to local [MCAP](https://mcap.dev/) files or a local visualization server that communicates
|
|
24
|
+
with the Foxglove app.
|
|
25
|
+
|
|
26
|
+
## Get Started
|
|
27
|
+
|
|
28
|
+
See https://foxglove.github.io/foxglove-sdk/python/
|
|
29
|
+
|
|
30
|
+
## Requirements
|
|
31
|
+
|
|
32
|
+
- Python 3.10+
|
|
33
|
+
|
|
34
|
+
## Examples
|
|
35
|
+
|
|
36
|
+
We're using uv as a Python package manager in the foxglove-sdk-examples.
|
|
37
|
+
|
|
38
|
+
To test that all examples run (as the CI does) you can use `yarn run-python-sdk-examples` in the repo root.
|
|
39
|
+
|
|
40
|
+
To run a specific example (e.g. write-mcap-file) with local changes:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
cd python/foxglove-sdk-examples/write-mcap-file
|
|
44
|
+
uv run --with ../../foxglove-sdk main.py [args]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Keep in mind that uv does two layers of caching.
|
|
48
|
+
There's the .venv in your project directory, plus a global cache at ~/.cache/uv.
|
|
49
|
+
|
|
50
|
+
uv tries to be smart about not rebuilding things it has already built,
|
|
51
|
+
which means that if you make changes and you want them to show up,
|
|
52
|
+
you also need to run `uv cache clean`.
|
|
53
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
foxglove\__init__.py,sha256=AXj9sq9K8_YCgkDDtyyw0bUSsuCpDg7gjzmgTvIUyI0,8478
|
|
2
|
+
foxglove\_foxglove_py\__init__.pyi,sha256=Ppw0LllCD5Jos1ZGPwEefRFJXVEj9ZWd_Nez2hUYjSs,6072
|
|
3
|
+
foxglove\_foxglove_py\channels.pyi,sha256=UfltAzsnYnukOD5aUi_3iFrMNkRQ0CireBsEO-Q2DjY,68973
|
|
4
|
+
foxglove\_foxglove_py\cloud.pyi,sha256=9Hqj7b9S2CTiWeWOIqaAw3GSmR-cGoSL4R7fi5WI-QA,255
|
|
5
|
+
foxglove\_foxglove_py\mcap.pyi,sha256=yh3RDXNiqSN5URCQF0efxezmWldvdQk_VHlW-clS0Cw,4936
|
|
6
|
+
foxglove\_foxglove_py\schemas.pyi,sha256=q_wlO-mkKGC3IuzVVXL6Ehxf5I240BOyginxt47EJqA,24212
|
|
7
|
+
foxglove\_foxglove_py\schemas_wkt.pyi,sha256=_nHeIdbOKMgPeL5V360-vZXCnEtyRIFzEd_JVsK49qo,2065
|
|
8
|
+
foxglove\_foxglove_py\websocket.pyi,sha256=NuCIpXp9P2bPNLyvjVYqcaeL71wKRyYB6RbTfkE6X7A,10511
|
|
9
|
+
foxglove\_foxglove_py.cp312-win32.pyd,sha256=vbI3ItQ85NM-BNJPYtQEz9o9KBWNuwvpte-6VCPoVoM,4081664
|
|
10
|
+
foxglove\benchmarks\test_mcap_serialization.py,sha256=Ab_J2Mz8Vya5ZD8Yypp2jdfhaOCxYW7hw5fos7LyFXk,4682
|
|
11
|
+
foxglove\channel.py,sha256=N9jUQXhD-wZq1lnZbRlNUPgBb79CiDksTeFYwTnAY6Y,8447
|
|
12
|
+
foxglove\channels\__init__.py,sha256=DOdeiFZ0bSquutHtkVxtmQmX78eiDfTmIl-OdVc7Btg,2452
|
|
13
|
+
foxglove\cloud.py,sha256=eOHV8ZCnut59uBLiw1c5MiwbIALeVwPzxo2Yb-2jbII,1942
|
|
14
|
+
foxglove\layouts\__init__.py,sha256=iC2-pMCrwGKkGWHzAsAbADONmL-tI3Rh_GT1AAfP6YI,517
|
|
15
|
+
foxglove\mcap.py,sha256=LR9TSyRlDWuHZpXR8iglmDp-S-4BRqgmvTOiUKHwlsA,200
|
|
16
|
+
foxglove\notebook\__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
+
foxglove\notebook\foxglove_widget.py,sha256=o-X47mFMU_WxZqNQxKMGQUFXWrqdSeUB_TYrwqXY4WM,2715
|
|
18
|
+
foxglove\notebook\notebook_buffer.py,sha256=o-m1coYMluqusBIeSAIvfSLaJQyMx7yRTGZzLX6vByw,3784
|
|
19
|
+
foxglove\notebook\static\widget.js,sha256=x5B4Vv_2c38Lx7Xbqn8UBAYEZ57Cz18Gsvwa7TnRzbQ,4035
|
|
20
|
+
foxglove\py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
+
foxglove\schemas\__init__.py,sha256=Jd-tsarhV55ZsK4z75-6BUAqINxoNkeyYLnwWZjmfW4,3291
|
|
22
|
+
foxglove\tests\__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
|
+
foxglove\tests\test_channel.py,sha256=coIPG-P_8Uczhw2-zRo4FoanlkReiE1CKUppM9mO1oE,7146
|
|
24
|
+
foxglove\tests\test_context.py,sha256=OvtvjzsRaZZHPT0RyRkwrpBip-7uLaxVPwlu2RJ12yY,256
|
|
25
|
+
foxglove\tests\test_logging.py,sha256=G2Mljb9nN5BOY5qKAeYo0x_2blY1iIRh9s80k0O3vaI,1472
|
|
26
|
+
foxglove\tests\test_mcap.py,sha256=Y4OYgWvkPSD288rJdlrgg1haVGeDRR39sWeUcb6VO8E,14863
|
|
27
|
+
foxglove\tests\test_parameters.py,sha256=18YsSPNnSM3VjVCh-Ag4S9mBv2G-x2zSwi5wzQClvqo,4861
|
|
28
|
+
foxglove\tests\test_schemas.py,sha256=4empQg8gqS7MD63ibU3kdQgJUSsUpnNQQWQ7oAf-4xk,423
|
|
29
|
+
foxglove\tests\test_server.py,sha256=rR50x21OOUMVuyYmYqiRTxOrgJFyL4ZL9W4pOshfAFc,3795
|
|
30
|
+
foxglove\tests\test_time.py,sha256=By_sM5r87s9iu4Df12r6p9DJrzTeZSLys3XGUGhvUps,4661
|
|
31
|
+
foxglove\websocket.py,sha256=PvsSGmWFayjRV20u86ZEZ9zcUD7nBC9j6CKPWNZy5ks,6331
|
|
32
|
+
foxglove_sdk-0.16.6.dist-info\METADATA,sha256=H_fB1z_2pxFbjqg902aUJ0uR6AMq1FBr4uVV4BM9w_Q,1716
|
|
33
|
+
foxglove_sdk-0.16.6.dist-info\WHEEL,sha256=akdtKPhgZFKWiFB2PSXRQPXzLs0y-XAkg8eqWX78MDg,93
|
|
34
|
+
foxglove_sdk-0.16.6.dist-info\RECORD,,
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: foxglove-sdk
|
|
3
|
-
Version: 0.6.2
|
|
4
|
-
Classifier: Programming Language :: Python :: 3
|
|
5
|
-
Classifier: Programming Language :: Rust
|
|
6
|
-
Summary: Foxglove Python SDK
|
|
7
|
-
Author-email: Foxglove <support@foxglove.dev>
|
|
8
|
-
License: MIT
|
|
9
|
-
Requires-Python: >=3.9
|
|
10
|
-
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
11
|
-
Project-URL: repository, https://github.com/foxglove/foxglove-sdk
|
|
12
|
-
Project-URL: documentation, https://docs.foxglove.dev/
|
|
13
|
-
|
|
14
|
-
# Foxglove Python SDK
|
|
15
|
-
|
|
16
|
-
## Requirements
|
|
17
|
-
|
|
18
|
-
- Python 3.9+
|
|
19
|
-
|
|
20
|
-
### Examples
|
|
21
|
-
|
|
22
|
-
To get started, install Poetry https://python-poetry.org/docs/#installation, and then the project dependencies. For example:
|
|
23
|
-
|
|
24
|
-
```sh
|
|
25
|
-
pipx install poetry
|
|
26
|
-
poetry install
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Examples are available in [foxglove-sdk-examples](https://github.com/foxglove/foxglove-sdk/tree/main/python/foxglove-sdk-examples).
|
|
30
|
-
|
|
31
|
-
## Overview
|
|
32
|
-
|
|
33
|
-
To record messages, you need at least one sink and at least one channel.
|
|
34
|
-
|
|
35
|
-
A "sink" is a destination for logged messages — either an MCAP file or a live visualization server.
|
|
36
|
-
Use `open_mcap` to register a new MCAP sink. Use `start_server` to create a new live visualization
|
|
37
|
-
server.
|
|
38
|
-
|
|
39
|
-
A "channel" gives a way to log related messages which have the same schema. Each channel is
|
|
40
|
-
instantiated with a unique topic name.
|
|
41
|
-
|
|
42
|
-
The SDK provides classes for well-known schemas. These can be used in conjunction with associated
|
|
43
|
-
channel classes for type-safe logging, which ensures at compile time that messages logged to a
|
|
44
|
-
channel all share a common schema. For example, you may create a `SceneUpdateChannel` on which you
|
|
45
|
-
will log `SceneUpdate` messages.
|
|
46
|
-
|
|
47
|
-
You can also log messages with arbitrary schemas and provide your own encoding, by instantiating a
|
|
48
|
-
`Channel` class.
|
|
49
|
-
|
|
50
|
-
See the examples for more details.
|
|
51
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
foxglove_sdk-0.6.2.dist-info/METADATA,sha256=biSX83ObwJtXycw7uv_t5WP5heGMSSK-jPAbIEeJIE8,1765
|
|
2
|
-
foxglove_sdk-0.6.2.dist-info/WHEEL,sha256=Cpy7yubMq7TIrQDSgiRDNCIdF4xsALHiC6zoU60uVnU,92
|
|
3
|
-
foxglove/benchmarks/test_mcap_serialization.py,sha256=G1rH9hVWzZQmHe5X1LEK9QbdW2WWfzUTOw937lbx6m8,4883
|
|
4
|
-
foxglove/channel.py,sha256=XgsVVV4wAUlFHFIHDHnd_cEVXGRl_KLHuO8gDdCSZ3k,7340
|
|
5
|
-
foxglove/channels/__init__.py,sha256=UQ5Vo-ttHNmDLeE3tX5bSP080qeZitiFtIP0CLXlXU4,1855
|
|
6
|
-
foxglove/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
foxglove/schemas/__init__.py,sha256=2a_dtl5zlkf7FUA2VTnMQl07SyXST3IQfGBqAkGQv70,3037
|
|
8
|
-
foxglove/tests/test_channel.py,sha256=YFH2HKCZQqQYbcEhvy4bxZMie4zNDqHrhSVn6mrA_jk,4187
|
|
9
|
-
foxglove/tests/test_logging.py,sha256=ZDs75WO3OgQFQ_wA056ZfLvNChdbfF1rKC52VKoesiA,371
|
|
10
|
-
foxglove/tests/test_mcap.py,sha256=KRLSN3OO8KOwxkoRNg5IVYxXP_zZjqkrn8M0jYpnsyg,1204
|
|
11
|
-
foxglove/tests/test_server.py,sha256=zBP7fm_zwrpr38GKEu9fpo0iTvJGDWKcCON8sQNPbdM,1745
|
|
12
|
-
foxglove/tests/test_time.py,sha256=OgAqZg7qHPoWcevVGyfmtz8dnqKpNsbC9mB04FB8OYk,4798
|
|
13
|
-
foxglove/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
-
foxglove/websocket.py,sha256=3Q5M9TTMOmJ_SZWnSGMZfRVWyCgT8daaG-U1RTvMFfE,5227
|
|
15
|
-
foxglove/_foxglove_py/channels.pyi,sha256=guuhxhBLlZxBaHi-dT4RtMKmHbWePMFfgwIs9qvw3rg,23418
|
|
16
|
-
foxglove/_foxglove_py/schemas.pyi,sha256=e4xe9z1XeDnu3oqf3pM_U46TYOSvTx8fOjAH6Zb3VoQ,16913
|
|
17
|
-
foxglove/_foxglove_py/schemas_wkt.pyi,sha256=fPO1Tc7-9P5uGnylpdVRCzLVn1DwR1ujAmj98wwKDwI,1958
|
|
18
|
-
foxglove/_foxglove_py/websocket.pyi,sha256=E95xTtKS_zSxj7q_oAVK20j70vZkIGhkba8o05kzV7o,7655
|
|
19
|
-
foxglove/_foxglove_py/__init__.pyi,sha256=_KuRxDTa7Yunx4AJ-yP2D97T6eCKD-uSqAV5f5Xn864,3534
|
|
20
|
-
foxglove/__init__.py,sha256=B3YZeQ2M0ij3P82J8Kv4STCqwFGcLXT7cu30g9TNE1Y,3665
|
|
21
|
-
foxglove/_foxglove_py.cp312-win32.pyd,sha256=X0actDzS83u_TkKMqjUEmJEKYxvBYLDz97R8eIbjaK8,3385856
|
|
22
|
-
foxglove_sdk-0.6.2.dist-info/RECORD,,
|