foxglove-sdk 0.15.3__cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.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.
- foxglove/__init__.py +241 -0
- foxglove/_foxglove_py/__init__.pyi +210 -0
- foxglove/_foxglove_py/channels.pyi +2792 -0
- foxglove/_foxglove_py/cloud.pyi +9 -0
- foxglove/_foxglove_py/mcap.pyi +96 -0
- foxglove/_foxglove_py/schemas.pyi +1009 -0
- foxglove/_foxglove_py/schemas_wkt.pyi +85 -0
- foxglove/_foxglove_py/websocket.pyi +321 -0
- foxglove/_foxglove_py.cpython-39-powerpc64le-linux-gnu.so +0 -0
- foxglove/benchmarks/test_mcap_serialization.py +160 -0
- foxglove/channel.py +241 -0
- foxglove/channels/__init__.py +94 -0
- foxglove/cloud.py +61 -0
- foxglove/mcap.py +12 -0
- foxglove/notebook/__init__.py +0 -0
- foxglove/notebook/foxglove_widget.py +100 -0
- foxglove/notebook/notebook_buffer.py +114 -0
- foxglove/notebook/static/widget.js +1 -0
- foxglove/py.typed +0 -0
- foxglove/schemas/__init__.py +163 -0
- foxglove/tests/__init__.py +0 -0
- foxglove/tests/test_channel.py +243 -0
- foxglove/tests/test_context.py +10 -0
- foxglove/tests/test_logging.py +62 -0
- foxglove/tests/test_mcap.py +199 -0
- foxglove/tests/test_parameters.py +178 -0
- foxglove/tests/test_schemas.py +17 -0
- foxglove/tests/test_server.py +112 -0
- foxglove/tests/test_time.py +137 -0
- foxglove/websocket.py +205 -0
- foxglove_sdk-0.15.3.dist-info/METADATA +53 -0
- foxglove_sdk-0.15.3.dist-info/RECORD +33 -0
- foxglove_sdk-0.15.3.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from typing import Any
|
|
3
|
+
|
|
4
|
+
class MCAPCompression(Enum):
|
|
5
|
+
"""
|
|
6
|
+
Compression options for content in an MCAP file.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
Zstd = 0
|
|
10
|
+
Lz4 = 1
|
|
11
|
+
|
|
12
|
+
class MCAPWriteOptions:
|
|
13
|
+
"""
|
|
14
|
+
Options for the MCAP writer.
|
|
15
|
+
|
|
16
|
+
:param compression: Specifies the compression that should be used on chunks. Defaults to Zstd.
|
|
17
|
+
Pass `None` to disable compression.
|
|
18
|
+
:param profile: Specifies the profile that should be written to the MCAP Header record.
|
|
19
|
+
:param chunk_size: Specifies the target uncompressed size of each chunk.
|
|
20
|
+
:param use_chunks: Specifies whether to use chunks for storing messages.
|
|
21
|
+
:param emit_statistics: Specifies whether to write a statistics record in the summary section.
|
|
22
|
+
:param emit_summary_offsets: Specifies whether to write summary offset records.
|
|
23
|
+
:param emit_message_indexes: Specifies whether to write message index records after each chunk.
|
|
24
|
+
:param emit_chunk_indexes: Specifies whether to write chunk index records in the summary
|
|
25
|
+
section.
|
|
26
|
+
:param repeat_channels: Specifies whether to repeat each channel record from the data section
|
|
27
|
+
in the summary section.
|
|
28
|
+
:param repeat_schemas: Specifies whether to repeat each schema record from the data section in
|
|
29
|
+
the summary section.
|
|
30
|
+
:param calculate_chunk_crcs: Specifies whether to calculate and write CRCs for chunk records.
|
|
31
|
+
:param calculate_data_section_crc: Specifies whether to calculate and write a data section CRC
|
|
32
|
+
into the DataEnd record.
|
|
33
|
+
:param calculate_summary_section_crc: Specifies whether to calculate and write a summary section
|
|
34
|
+
CRC into the Footer record.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(
|
|
38
|
+
self,
|
|
39
|
+
*,
|
|
40
|
+
compression: MCAPCompression | None = MCAPCompression.Zstd,
|
|
41
|
+
profile: str | None = None,
|
|
42
|
+
chunk_size: int | None = None,
|
|
43
|
+
use_chunks: bool = False,
|
|
44
|
+
emit_statistics: bool = True,
|
|
45
|
+
emit_summary_offsets: bool = True,
|
|
46
|
+
emit_message_indexes: bool = True,
|
|
47
|
+
emit_chunk_indexes: bool = True,
|
|
48
|
+
repeat_channels: bool = True,
|
|
49
|
+
repeat_schemas: bool = True,
|
|
50
|
+
calculate_chunk_crcs: bool = True,
|
|
51
|
+
calculate_data_section_crc: bool = True,
|
|
52
|
+
calculate_summary_section_crc: bool = True,
|
|
53
|
+
) -> None: ...
|
|
54
|
+
|
|
55
|
+
class MCAPWriter:
|
|
56
|
+
"""
|
|
57
|
+
A writer for logging messages to an MCAP file.
|
|
58
|
+
|
|
59
|
+
Obtain an instance by calling :py:func:`open_mcap`.
|
|
60
|
+
|
|
61
|
+
This class may be used as a context manager, in which case the writer will
|
|
62
|
+
be closed when you exit the context.
|
|
63
|
+
|
|
64
|
+
If the writer is not closed by the time it is garbage collected, it will be
|
|
65
|
+
closed automatically, and any errors will be logged.
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
def __init__(
|
|
69
|
+
self,
|
|
70
|
+
*,
|
|
71
|
+
allow_overwrite: bool | None = False,
|
|
72
|
+
writer_options: MCAPWriteOptions | None = None,
|
|
73
|
+
) -> None: ...
|
|
74
|
+
def __enter__(self) -> "MCAPWriter": ...
|
|
75
|
+
def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None: ...
|
|
76
|
+
def close(self) -> None:
|
|
77
|
+
"""
|
|
78
|
+
Close the writer explicitly.
|
|
79
|
+
|
|
80
|
+
You may call this to explicitly close the writer. Note that the writer
|
|
81
|
+
will be automatically closed when it is garbage-collected, or when
|
|
82
|
+
exiting the context manager.
|
|
83
|
+
"""
|
|
84
|
+
...
|
|
85
|
+
|
|
86
|
+
def write_metadata(self, name: str, metadata: dict[str, str]) -> None:
|
|
87
|
+
"""
|
|
88
|
+
Write metadata to the MCAP file.
|
|
89
|
+
|
|
90
|
+
Metadata consists of key-value string pairs associated with a name.
|
|
91
|
+
If the metadata dictionary is empty, this method does nothing.
|
|
92
|
+
|
|
93
|
+
:param name: Name identifier for this metadata record
|
|
94
|
+
:param metadata: Dictionary of key-value pairs to store
|
|
95
|
+
"""
|
|
96
|
+
...
|