signalk-cli 2.2.1__tar.gz → 3.0.1__tar.gz

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.
Files changed (32) hide show
  1. signalk_cli-2.2.1/README.md → signalk_cli-3.0.1/PKG-INFO +98 -13
  2. signalk_cli-2.2.1/PKG-INFO → signalk_cli-3.0.1/README.md +65 -40
  3. {signalk_cli-2.2.1 → signalk_cli-3.0.1}/pyproject.toml +27 -7
  4. {signalk_cli-2.2.1 → signalk_cli-3.0.1}/pyproject.toml.orig +25 -9
  5. signalk_cli-3.0.1/src/signalk_cli/__init__.py +33 -0
  6. signalk_cli-3.0.1/src/signalk_cli/_arrow.py +147 -0
  7. signalk_cli-3.0.1/src/signalk_cli/_cli.py +82 -0
  8. signalk_cli-3.0.1/src/signalk_cli/errors.py +37 -0
  9. signalk_cli-3.0.1/src/signalk_cli/history/__init__.py +25 -0
  10. signalk_cli-3.0.1/src/signalk_cli/history/_results.py +230 -0
  11. signalk_cli-3.0.1/src/signalk_cli/history/_time.py +177 -0
  12. signalk_cli-3.0.1/src/signalk_cli/history/api.py +515 -0
  13. signalk_cli-3.0.1/src/signalk_cli/history/cli.py +573 -0
  14. signalk_cli-3.0.1/src/signalk_cli/history/output.py +84 -0
  15. signalk_cli-3.0.1/src/signalk_cli/net.py +72 -0
  16. signalk_cli-3.0.1/src/signalk_cli/py.typed +0 -0
  17. signalk_cli-3.0.1/src/signalk_cli/stream/__init__.py +29 -0
  18. signalk_cli-3.0.1/src/signalk_cli/stream/api.py +401 -0
  19. {signalk_cli-2.2.1 → signalk_cli-3.0.1}/src/signalk_cli/stream/cli.py +46 -57
  20. signalk_cli-3.0.1/src/signalk_cli/stream/output.py +61 -0
  21. signalk_cli-2.2.1/src/signalk_cli/__init__.py +0 -1
  22. signalk_cli-2.2.1/src/signalk_cli/history/__init__.py +0 -33
  23. signalk_cli-2.2.1/src/signalk_cli/history/cli.py +0 -741
  24. signalk_cli-2.2.1/src/signalk_cli/history/history_api.py +0 -253
  25. signalk_cli-2.2.1/src/signalk_cli/history/output.py +0 -421
  26. signalk_cli-2.2.1/src/signalk_cli/net.py +0 -142
  27. signalk_cli-2.2.1/src/signalk_cli/stream/__init__.py +0 -21
  28. signalk_cli-2.2.1/src/signalk_cli/stream/output.py +0 -181
  29. signalk_cli-2.2.1/src/signalk_cli/stream/stream_api.py +0 -106
  30. {signalk_cli-2.2.1 → signalk_cli-3.0.1}/src/signalk_cli/__main__.py +0 -0
  31. {signalk_cli-2.2.1 → signalk_cli-3.0.1}/src/signalk_cli/history/__main__.py +0 -0
  32. {signalk_cli-2.2.1 → signalk_cli-3.0.1}/src/signalk_cli/stream/__main__.py +0 -0
@@ -1,3 +1,40 @@
1
+ Metadata-Version: 2.4
2
+ Name: signalk-cli
3
+ Version: 3.0.1
4
+ Summary: Query SignalK v2 APIs and export data as CSV, JSON or Apache Arrow Feather from command line or as a Python API
5
+ Keywords: signalk,sailing,marine,boating,nmea,dataframe,cli,pyarrow,nanoarrow
6
+ Author: jey burrows
7
+ Author-email: jey burrows <jrb@rhizomatics.org.uk>
8
+ License-Expression: Apache-2.0
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Environment :: Console
11
+ Classifier: Natural Language :: English
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Topic :: Scientific/Engineering
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Requires-Dist: click>=8.3.3
18
+ Requires-Dist: nanoarrow>=0.9.0,<1.0.0
19
+ Requires-Dist: niquests[ws]>=2.28
20
+ Requires-Dist: niquests[ws]>=3.21.0 ; sys_platform == 'emscripten'
21
+ Requires-Dist: zeroconf>=0.149.16,<0.152.0 ; sys_platform != 'emscripten'
22
+ Requires-Dist: pyarrow>=17.0 ; extra == 'arrow'
23
+ Requires-Dist: pyarrow>=17.0 ; extra == 'feather'
24
+ Requires-Python: >=3.13
25
+ Project-URL: Homepage, https://signalk-cli.rhizomatics.org.uk
26
+ Project-URL: Repository, https://github.com/rhizomatics/signalk-cli
27
+ Project-URL: Issues, https://github.com/rhizomatics/signalk-cli/issues
28
+ Project-URL: Changelog, https://github.com/rhizomatics/signalk-cli/blob/main/CHANGELOG.md
29
+ Provides-Extra: arrow
30
+ Provides-Extra: feather
31
+ Description-Content-Type: text/markdown
32
+
33
+ ---
34
+ title: SignalK CLI
35
+ description: Command line access to SignalK APIs and streaming data, for piping within console, or export to CSV, JSON or Apache Arrow Feather for dataframe analysis.
36
+ ---
37
+
1
38
  # SignalK CLI
2
39
 
3
40
  [![Rhizomatics Open Source](https://img.shields.io/badge/rhizomatics%20open%20source-lightseagreen)](https://github.com/rhizomatics)
@@ -13,9 +50,33 @@
13
50
  [![Dependabot Updates](https://github.com/rhizomatics/signalk-cli/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/rhizomatics/signalk-cli/actions/workflows/dependabot/dependabot-updates)
14
51
  [![boat tech directory](https://boat-tech-directory.rhizomatics.org.uk/images/badge.svg)](https://boat-tech-directory.rhizomatics.org.uk)
15
52
 
16
- Query and explore NMEA and other boat data from SignalK APIs using the command line, and export data as CSV, Apache Arrow Feather, or JSON.
53
+ Query and explore NMEA and other boat data from SignalK APIs using the command line or the Python API. Export data as CSV, Apache Arrow Feather, or JSON or use as dataframes in scripts or data notebooks.
17
54
 
18
- APIs supported:
55
+ `signalk_cli` goes beyond raw API data extraction to automatically handle metrics and 'wide' tables that bring together aggregates like 'max' or 'avg' into separate columns for simpler queries. It also has an analysis tools to summarize data variability.
56
+
57
+ <!-- termynal -->
58
+ ```
59
+ $ uv run --with signalk-cli signalk_cli.history list-providers
60
+ provider,isDefault
61
+ kip,False
62
+ signalk-parquet,True
63
+
64
+ uv run --with signalk-cli signalk_cli.history query 'environment.outside.wind.gust:max' 'environment.wind.speedApparent:avg' --duration P7D --resolution 1m
65
+ timestamp,path,value
66
+ 2026-10-03T09:11:00Z,environment.wind.speedApparent,5.8
67
+ 2026-10-03T09:12:00Z,environment.outside.wind.gust,45.36699999999996
68
+ 2026-10-03T09:12:00Z,environment.wind.speedApparent,5.8
69
+ 2026-10-03T09:13:00Z,environment.outside.wind.gust,15.317000000000009
70
+
71
+ uv run --with signalk-cli signalk_cli.stream deltas 'environment.outside.wind.*' --follow
72
+ timestamp,context,source,path,value
73
+ 2026-10-03T09:08:21.042Z,vessels.urn:mrn:signalk:uuid:64f1567b-2fc2-474f-8b23-4e9c43b61ffb,simulator.0,environment.outside.wind.gust,44.29449999999997
74
+ 2026-10-03T09:08:23.042Z,vessels.urn:mrn:signalk:uuid:64f1567b-2fc2-474f-8b23-4e9c43b61ffb,simulator.0,environment.outside.wind.gust,45.29449999999997
75
+ ...
76
+
77
+ ```
78
+
79
+ ## APIs supported:
19
80
 
20
81
  ### [SignalK v2 History API](https://demo.signalk.org/documentation/Developing/REST_APIs/History_API.html).
21
82
 
@@ -43,17 +104,18 @@ Python is required to run this, version 3.13 or above. [uv](https://docs.astral.
43
104
 
44
105
  For Apache Arrow Feather export, use the optional dependency: ```pip install 'signalk-cli[feather]'```
45
106
 
46
- ### Pyodide / slim install
107
+ ### Pyodide / WebAssembly
47
108
 
48
- `zeroconf` (used only for mDNS host discovery) can't run in Pyodide, and is optional at runtime. Install without dependencies and add the rest explicitly:
109
+ The same wheel installs in Pyodide (e.g. marimo in the browser). Platform markers skip `zeroconf`, which can't run there, and require `niquests>=3.21.0`:
49
110
 
50
111
  ```python
51
112
  import micropip
52
- await micropip.install(["click", "niquests[ws]>=3.21.0"])
53
- await micropip.install("signalk-cli", deps=False)
113
+ await micropip.install("signalk-cli")
54
114
  ```
55
115
 
56
- Without `zeroconf`, the host must be given with `--host` or `SIGNALK_HOST` (or come from the cache).
116
+ Without `zeroconf` there's no mDNS discovery, so the host must be given with `--host` or `SIGNALK_HOST` (or come from the cache).
117
+
118
+ See [signalk-datalab-plugin](https://github.com/rhizomatics/signalk-datalab-plugin) for a working example of this.
57
119
 
58
120
  ### Local Copy
59
121
 
@@ -65,7 +127,7 @@ cd signalk-cli
65
127
  uv sync
66
128
  ```
67
129
 
68
- ## Temporary Installation
130
+ ## Use without Installing
69
131
 
70
132
  Use `uv` to run without installing the module permanently, for example:
71
133
 
@@ -77,6 +139,26 @@ uv run --with signalk-cli signalk_cli.history list-providers
77
139
  uv run --with signalk-cli signalk_cli.stream deltas navigation.position --follow
78
140
  ```
79
141
 
142
+ Wildcards to follow multiple paths need to be quoted
143
+
144
+ ```bash
145
+ uv run --with signalk-cli signalk_cli.stream deltas 'environment.outside.wind.*' --follow
146
+ ```
147
+
148
+ ## Python library
149
+
150
+ Everything the CLI does is also available from Python, returning tables that load straight into polars, pandas, pyarrow or DuckDB:
151
+
152
+ ```python
153
+ from signalk_cli import HistoryClient, TimeRange
154
+ import polars as pl
155
+
156
+ with HistoryClient("http://boat.local:3000") as client:
157
+ df = pl.DataFrame(client.query(["navigation.*"], TimeRange(duration="P1D")))
158
+ ```
159
+
160
+ See the [Python library guide](https://signalk-cli.rhizomatics.org.uk/library/) and API reference.
161
+
80
162
  ## Running
81
163
 
82
164
  Run via `python -m signalk_cli.history <command>` or `python -m signalk_cli.stream <command>` or without installing the module with `uv run --with signalk-cli signalk_cli.history <command>`.
@@ -107,6 +189,7 @@ Commands:
107
189
  query Query history and write results as CSV, Feather, or JSON.
108
190
  ```
109
191
 
192
+
110
193
  ## Commands
111
194
 
112
195
 
@@ -122,7 +205,7 @@ python -m signalk_cli.history query [OPTIONS] PATH...
122
205
  **PATH** arguments may be:
123
206
 
124
207
  - **Literal paths** — e.g. `navigation.speedOverGround`
125
- - **Regex / glob patterns** — any argument containing metacharacters (`*`, `.`, `[`, `(`, etc.) is matched against the server's `/paths` endpoint. Bare `*` is treated as a glob wildcard.
208
+ - **Regex / glob patterns** — any argument containing a pattern character (`*`, `?`, `+`, `[`, `(`, `{`, `|`, `^`, `$` or `\`) is matched against the server's `/paths` endpoint. A `.` on its own doesn't count, so a plain dotted path is always literal. Bare `*` is treated as a glob wildcard.
126
209
  - **Inline path specs** — `path:method` or `path:method:param`, e.g. `navigation.speedOverGround:sma:5`. These pass through to the server unchanged.
127
210
 
128
211
  #### Options
@@ -426,11 +509,9 @@ python -m signalk_cli.stream deltas [OPTIONS] [PATH...]
426
509
  ```
427
510
 
428
511
  By default, prints the next delta message and exits — useful for a quick check.
429
- Use `--follow` to keep tailing until interrupted with Ctrl-C, optionally capped
430
- with `--count`.
512
+ Use `--follow` to keep tailing until interrupted with Ctrl-C, optionally capped with `--count`.
431
513
 
432
- **PATH** arguments are sent verbatim to the server as an explicit subscription,
433
- one per path. They may be literal SignalK paths (e.g. `navigation.speedOverGround`)
514
+ **PATH** arguments are sent verbatim to the server as an explicit subscription, one per path. They may be literal SignalK paths (e.g. `navigation.speedOverGround`)
434
515
  or use the SignalK subscription wildcard `*`, matched server-side per the
435
516
  [Subscription Protocol](https://signalk.org/specification/1.8.2/doc/subscription_protocol.html)
436
517
  — unlike `history`'s PATH patterns, which the client resolves by matching
@@ -574,3 +655,7 @@ Typical combinations:
574
655
  ## Default caching
575
656
 
576
657
  The default history provider is fetched from the server once and cached per host in `~/.cache/signalk-history-cli/`. Pass `--no-cache` to force a fresh lookup, or `--provider <id>` to target a specific provider explicitly.
658
+
659
+ ## Too Much Streaming Data
660
+
661
+ If the data is too noisy, like GPS positions with dubious centimeter differences, then [signalk-delta-squelch-plugin](https://github.com/rhizomatics/signalk-delta-squelch-plugin) can cut this down hugely, and also filter out GPS glitches that suggest your boat moves at warp speed.
@@ -1,30 +1,7 @@
1
- Metadata-Version: 2.4
2
- Name: signalk-cli
3
- Version: 2.2.1
4
- Summary: Query SignalK v2 APIs and export data as CSV, JSON or Apache Arrow Feather
5
- Keywords: signalk,sailing,marine,nmea,boating
6
- Author: jey burrows
7
- Author-email: jey burrows <jrb@rhizomatics.org.uk>
8
- License-Expression: Apache-2.0
9
- Classifier: Development Status :: 5 - Production/Stable
10
- Classifier: Environment :: Console
11
- Classifier: Natural Language :: English
12
- Classifier: Intended Audience :: Developers
13
- Classifier: Topic :: Scientific/Engineering
14
- Classifier: Programming Language :: Python
15
- Classifier: Programming Language :: Python :: 3.13
16
- Classifier: Programming Language :: Python :: 3.14
17
- Requires-Dist: click>=8.3.3
18
- Requires-Dist: niquests[ws]>=2.28
19
- Requires-Dist: zeroconf>=0.149.16,<0.152.0
20
- Requires-Dist: pyarrow>=17.0 ; extra == 'feather'
21
- Requires-Python: >=3.13
22
- Project-URL: Homepage, https://signalk-cli.rhizomatics.org.uk
23
- Project-URL: Repository, https://github.com/rhizomatics/signalk-cli
24
- Project-URL: Issues, https://github.com/rhizomatics/signalk-cli/issues
25
- Project-URL: Changelog, https://github.com/rhizomatics/signalk-cli/blob/main/CHANGELOG.md
26
- Provides-Extra: feather
27
- Description-Content-Type: text/markdown
1
+ ---
2
+ title: SignalK CLI
3
+ description: Command line access to SignalK APIs and streaming data, for piping within console, or export to CSV, JSON or Apache Arrow Feather for dataframe analysis.
4
+ ---
28
5
 
29
6
  # SignalK CLI
30
7
 
@@ -41,9 +18,33 @@ Description-Content-Type: text/markdown
41
18
  [![Dependabot Updates](https://github.com/rhizomatics/signalk-cli/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/rhizomatics/signalk-cli/actions/workflows/dependabot/dependabot-updates)
42
19
  [![boat tech directory](https://boat-tech-directory.rhizomatics.org.uk/images/badge.svg)](https://boat-tech-directory.rhizomatics.org.uk)
43
20
 
44
- Query and explore NMEA and other boat data from SignalK APIs using the command line, and export data as CSV, Apache Arrow Feather, or JSON.
21
+ Query and explore NMEA and other boat data from SignalK APIs using the command line or the Python API. Export data as CSV, Apache Arrow Feather, or JSON or use as dataframes in scripts or data notebooks.
22
+
23
+ `signalk_cli` goes beyond raw API data extraction to automatically handle metrics and 'wide' tables that bring together aggregates like 'max' or 'avg' into separate columns for simpler queries. It also has an analysis tools to summarize data variability.
24
+
25
+ <!-- termynal -->
26
+ ```
27
+ $ uv run --with signalk-cli signalk_cli.history list-providers
28
+ provider,isDefault
29
+ kip,False
30
+ signalk-parquet,True
31
+
32
+ uv run --with signalk-cli signalk_cli.history query 'environment.outside.wind.gust:max' 'environment.wind.speedApparent:avg' --duration P7D --resolution 1m
33
+ timestamp,path,value
34
+ 2026-10-03T09:11:00Z,environment.wind.speedApparent,5.8
35
+ 2026-10-03T09:12:00Z,environment.outside.wind.gust,45.36699999999996
36
+ 2026-10-03T09:12:00Z,environment.wind.speedApparent,5.8
37
+ 2026-10-03T09:13:00Z,environment.outside.wind.gust,15.317000000000009
45
38
 
46
- APIs supported:
39
+ uv run --with signalk-cli signalk_cli.stream deltas 'environment.outside.wind.*' --follow
40
+ timestamp,context,source,path,value
41
+ 2026-10-03T09:08:21.042Z,vessels.urn:mrn:signalk:uuid:64f1567b-2fc2-474f-8b23-4e9c43b61ffb,simulator.0,environment.outside.wind.gust,44.29449999999997
42
+ 2026-10-03T09:08:23.042Z,vessels.urn:mrn:signalk:uuid:64f1567b-2fc2-474f-8b23-4e9c43b61ffb,simulator.0,environment.outside.wind.gust,45.29449999999997
43
+ ...
44
+
45
+ ```
46
+
47
+ ## APIs supported:
47
48
 
48
49
  ### [SignalK v2 History API](https://demo.signalk.org/documentation/Developing/REST_APIs/History_API.html).
49
50
 
@@ -71,17 +72,18 @@ Python is required to run this, version 3.13 or above. [uv](https://docs.astral.
71
72
 
72
73
  For Apache Arrow Feather export, use the optional dependency: ```pip install 'signalk-cli[feather]'```
73
74
 
74
- ### Pyodide / slim install
75
+ ### Pyodide / WebAssembly
75
76
 
76
- `zeroconf` (used only for mDNS host discovery) can't run in Pyodide, and is optional at runtime. Install without dependencies and add the rest explicitly:
77
+ The same wheel installs in Pyodide (e.g. marimo in the browser). Platform markers skip `zeroconf`, which can't run there, and require `niquests>=3.21.0`:
77
78
 
78
79
  ```python
79
80
  import micropip
80
- await micropip.install(["click", "niquests[ws]>=3.21.0"])
81
- await micropip.install("signalk-cli", deps=False)
81
+ await micropip.install("signalk-cli")
82
82
  ```
83
83
 
84
- Without `zeroconf`, the host must be given with `--host` or `SIGNALK_HOST` (or come from the cache).
84
+ Without `zeroconf` there's no mDNS discovery, so the host must be given with `--host` or `SIGNALK_HOST` (or come from the cache).
85
+
86
+ See [signalk-datalab-plugin](https://github.com/rhizomatics/signalk-datalab-plugin) for a working example of this.
85
87
 
86
88
  ### Local Copy
87
89
 
@@ -93,7 +95,7 @@ cd signalk-cli
93
95
  uv sync
94
96
  ```
95
97
 
96
- ## Temporary Installation
98
+ ## Use without Installing
97
99
 
98
100
  Use `uv` to run without installing the module permanently, for example:
99
101
 
@@ -105,6 +107,26 @@ uv run --with signalk-cli signalk_cli.history list-providers
105
107
  uv run --with signalk-cli signalk_cli.stream deltas navigation.position --follow
106
108
  ```
107
109
 
110
+ Wildcards to follow multiple paths need to be quoted
111
+
112
+ ```bash
113
+ uv run --with signalk-cli signalk_cli.stream deltas 'environment.outside.wind.*' --follow
114
+ ```
115
+
116
+ ## Python library
117
+
118
+ Everything the CLI does is also available from Python, returning tables that load straight into polars, pandas, pyarrow or DuckDB:
119
+
120
+ ```python
121
+ from signalk_cli import HistoryClient, TimeRange
122
+ import polars as pl
123
+
124
+ with HistoryClient("http://boat.local:3000") as client:
125
+ df = pl.DataFrame(client.query(["navigation.*"], TimeRange(duration="P1D")))
126
+ ```
127
+
128
+ See the [Python library guide](https://signalk-cli.rhizomatics.org.uk/library/) and API reference.
129
+
108
130
  ## Running
109
131
 
110
132
  Run via `python -m signalk_cli.history <command>` or `python -m signalk_cli.stream <command>` or without installing the module with `uv run --with signalk-cli signalk_cli.history <command>`.
@@ -135,6 +157,7 @@ Commands:
135
157
  query Query history and write results as CSV, Feather, or JSON.
136
158
  ```
137
159
 
160
+
138
161
  ## Commands
139
162
 
140
163
 
@@ -150,7 +173,7 @@ python -m signalk_cli.history query [OPTIONS] PATH...
150
173
  **PATH** arguments may be:
151
174
 
152
175
  - **Literal paths** — e.g. `navigation.speedOverGround`
153
- - **Regex / glob patterns** — any argument containing metacharacters (`*`, `.`, `[`, `(`, etc.) is matched against the server's `/paths` endpoint. Bare `*` is treated as a glob wildcard.
176
+ - **Regex / glob patterns** — any argument containing a pattern character (`*`, `?`, `+`, `[`, `(`, `{`, `|`, `^`, `$` or `\`) is matched against the server's `/paths` endpoint. A `.` on its own doesn't count, so a plain dotted path is always literal. Bare `*` is treated as a glob wildcard.
154
177
  - **Inline path specs** — `path:method` or `path:method:param`, e.g. `navigation.speedOverGround:sma:5`. These pass through to the server unchanged.
155
178
 
156
179
  #### Options
@@ -454,11 +477,9 @@ python -m signalk_cli.stream deltas [OPTIONS] [PATH...]
454
477
  ```
455
478
 
456
479
  By default, prints the next delta message and exits — useful for a quick check.
457
- Use `--follow` to keep tailing until interrupted with Ctrl-C, optionally capped
458
- with `--count`.
480
+ Use `--follow` to keep tailing until interrupted with Ctrl-C, optionally capped with `--count`.
459
481
 
460
- **PATH** arguments are sent verbatim to the server as an explicit subscription,
461
- one per path. They may be literal SignalK paths (e.g. `navigation.speedOverGround`)
482
+ **PATH** arguments are sent verbatim to the server as an explicit subscription, one per path. They may be literal SignalK paths (e.g. `navigation.speedOverGround`)
462
483
  or use the SignalK subscription wildcard `*`, matched server-side per the
463
484
  [Subscription Protocol](https://signalk.org/specification/1.8.2/doc/subscription_protocol.html)
464
485
  — unlike `history`'s PATH patterns, which the client resolves by matching
@@ -602,3 +623,7 @@ Typical combinations:
602
623
  ## Default caching
603
624
 
604
625
  The default history provider is fetched from the server once and cached per host in `~/.cache/signalk-history-cli/`. Pass `--no-cache` to force a fresh lookup, or `--provider <id>` to target a specific provider explicitly.
626
+
627
+ ## Too Much Streaming Data
628
+
629
+ If the data is too noisy, like GPS positions with dubious centimeter differences, then [signalk-delta-squelch-plugin](https://github.com/rhizomatics/signalk-delta-squelch-plugin) can cut this down hugely, and also filter out GPS glitches that suggest your boat moves at warp speed.
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "signalk-cli"
3
- version = "2.2.1"
4
- description = "Query SignalK v2 APIs and export data as CSV, JSON or Apache Arrow Feather"
3
+ version = "3.0.1"
4
+ description = "Query SignalK v2 APIs and export data as CSV, JSON or Apache Arrow Feather from command line or as a Python API"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
7
7
  license = "Apache-2.0"
@@ -9,8 +9,12 @@ keywords = [
9
9
  "signalk",
10
10
  "sailing",
11
11
  "marine",
12
- "nmea",
13
12
  "boating",
13
+ "nmea",
14
+ "dataframe",
15
+ "cli",
16
+ "pyarrow",
17
+ "nanoarrow",
14
18
  ]
15
19
  classifiers = [
16
20
  "Development Status :: 5 - Production/Stable",
@@ -24,8 +28,10 @@ classifiers = [
24
28
  ]
25
29
  dependencies = [
26
30
  "click>=8.3.3",
31
+ "nanoarrow>=0.9.0,<1.0.0",
27
32
  "niquests[ws]>=2.28",
28
- "zeroconf>=0.149.16,<0.152.0",
33
+ "niquests[ws]>=3.21.0; sys_platform == 'emscripten'",
34
+ "zeroconf>=0.149.16,<0.152.0; sys_platform != 'emscripten'",
29
35
  ]
30
36
 
31
37
  [[project.authors]]
@@ -34,6 +40,7 @@ email = "jrb@rhizomatics.org.uk"
34
40
 
35
41
  [project.optional-dependencies]
36
42
  feather = ["pyarrow>=17.0"]
43
+ arrow = ["pyarrow>=17.0"]
37
44
 
38
45
  [project.urls]
39
46
  Homepage = "https://signalk-cli.rhizomatics.org.uk"
@@ -55,9 +62,13 @@ dev = [
55
62
  "pytest-xdist",
56
63
  "mypy",
57
64
  "coverage",
65
+ "bandit",
58
66
  "genbadge[all]",
59
67
  "icdiff",
60
68
  "codespell",
69
+ "polars>=1.44.2,<3.0.0",
70
+ "duckdb>=1.5.5,<3.0.0",
71
+ "pandas>=3.0.6,<4.0.0",
61
72
  ]
62
73
  docs = [
63
74
  "properdocs",
@@ -67,10 +78,14 @@ docs = [
67
78
  "mkdocs-pagetree-plugin",
68
79
  "mkdocs-coverage",
69
80
  "pymdown-extensions",
81
+ "mkdocs-homepage-copier",
70
82
  "mkdocs-meta-descriptions-plugin",
71
83
  "pngquant",
84
+ "termynal",
85
+ "pillow>=13.0.0",
72
86
  "mkdocs-htmlproofer-plugin",
73
87
  "mkdocs-llmstxt>=0.5.0,<0.6.0",
88
+ "mkdocstrings[python]>=1.0.6,<2.0.0",
74
89
  ]
75
90
 
76
91
  [tool.bandit]
@@ -95,7 +110,7 @@ branch = true
95
110
  source = ["src"]
96
111
 
97
112
  [tool.coverage.report]
98
- fail_under = 0
113
+ fail_under = 90
99
114
 
100
115
  [tool.coverage.xml]
101
116
  output = "cov.xml"
@@ -113,7 +128,10 @@ ignore-words-list = "hass,referer,uint"
113
128
  mypy_path = ["./src"]
114
129
 
115
130
  [[tool.mypy.overrides]]
116
- module = "pyarrow.*"
131
+ module = [
132
+ "pyarrow.*",
133
+ "nanoarrow.*",
134
+ ]
117
135
  ignore_missing_imports = true
118
136
 
119
137
  [tool.ty.analysis]
@@ -129,6 +147,8 @@ exclude-newer = "7 days"
129
147
  add-bounds = "major"
130
148
 
131
149
  [tool.uv.exclude-newer-package]
150
+ certifi = false
151
+ pillow = false
132
152
  uv_build = "2 days"
133
153
 
134
154
  [tool.uv.build-backend]
@@ -136,5 +156,5 @@ module-root = "src"
136
156
  module-name = "signalk_cli"
137
157
 
138
158
  [build-system]
139
- requires = ["uv_build>=0.12.0,<0.13.0"]
159
+ requires = ["uv_build>=0.12.0"]
140
160
  build-backend = "uv_build"
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "signalk-cli"
3
- version = "2.2.1"
4
- description = "Query SignalK v2 APIs and export data as CSV, JSON or Apache Arrow Feather"
3
+ version = "3.0.1"
4
+ description = "Query SignalK v2 APIs and export data as CSV, JSON or Apache Arrow Feather from command line or as a Python API"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
7
7
  license="Apache-2.0"
@@ -9,7 +9,9 @@ authors = [
9
9
  { name = "jey burrows", email = "jrb@rhizomatics.org.uk" }
10
10
  ]
11
11
 
12
- keywords = ["signalk", "sailing", "marine", "nmea","boating"]
12
+ keywords = ["signalk", "sailing", "marine", "boating",
13
+ "nmea",
14
+ "dataframe","cli","pyarrow","nanoarrow"]
13
15
  classifiers = [
14
16
  "Development Status :: 5 - Production/Stable",
15
17
  "Environment :: Console",
@@ -23,12 +25,18 @@ classifiers = [
23
25
 
24
26
  dependencies = [
25
27
  "click>=8.3.3",
28
+ "nanoarrow>=0.9.0,<1.0.0",
26
29
  "niquests[ws]>=2.28",
27
- "zeroconf>=0.149.16,<0.152.0",
30
+ # Pyodide/WASM: niquests needs >=3.21 there, and zeroconf can't run (no raw sockets)
31
+ "niquests[ws]>=3.21.0; sys_platform == 'emscripten'",
32
+ "zeroconf>=0.149.16,<0.152.0; sys_platform != 'emscripten'",
28
33
  ]
29
34
 
30
35
  [project.optional-dependencies]
36
+ # pyarrow, only needed to write Feather files from the CLI
31
37
  feather = ["pyarrow>=17.0"]
38
+ # alias of feather
39
+ arrow = ["pyarrow>=17.0"]
32
40
  [dependency-groups]
33
41
  dev = [
34
42
  "ruff>=0.16.0",
@@ -39,9 +47,13 @@ dev = [
39
47
  "pytest-xdist",
40
48
  "mypy",
41
49
  "coverage",
50
+ "bandit",
42
51
  "genbadge[all]",
43
52
  "icdiff",
44
- "codespell"
53
+ "codespell",
54
+ "polars>=1.44.2,<3.0.0",
55
+ "duckdb>=1.5.5,<3.0.0",
56
+ "pandas>=3.0.6,<4.0.0",
45
57
  ]
46
58
 
47
59
  docs=[
@@ -52,10 +64,14 @@ docs=[
52
64
  "mkdocs-pagetree-plugin",
53
65
  "mkdocs-coverage",
54
66
  "pymdown-extensions",
67
+ "mkdocs-homepage-copier",
55
68
  "mkdocs-meta-descriptions-plugin",
56
69
  "pngquant",
70
+ "termynal",
71
+ "pillow>=13.0.0",
57
72
  "mkdocs-htmlproofer-plugin",
58
73
  "mkdocs-llmstxt>=0.5.0,<0.6.0",
74
+ "mkdocstrings[python]>=1.0.6,<2.0.0",
59
75
  ]
60
76
 
61
77
  [project.urls]
@@ -95,7 +111,7 @@ branch = true
95
111
  source = ["src"]
96
112
 
97
113
  [tool.coverage.report]
98
- fail_under=0
114
+ fail_under=90
99
115
 
100
116
  [tool.coverage.xml]
101
117
  output="cov.xml"
@@ -113,7 +129,7 @@ ignore-words-list="hass,referer,uint"
113
129
  mypy_path=["./src"]
114
130
 
115
131
  [[tool.mypy.overrides]]
116
- module = "pyarrow.*"
132
+ module = ["pyarrow.*", "nanoarrow.*"]
117
133
  ignore_missing_imports = true
118
134
 
119
135
  [tool.ty.analysis]
@@ -124,11 +140,11 @@ allowed-unresolved-imports = ["pyarrow", "pyarrow.**"]
124
140
  compile-bytecode = true
125
141
  managed = true
126
142
  exclude-newer = "7 days"
127
- exclude-newer-package = {"uv_build"="2 days"}
143
+ exclude-newer-package = {certifi=false, pillow=false,"uv_build"="2 days"}
128
144
  add-bounds = "major"
129
145
 
130
146
  [build-system]
131
- requires = ["uv_build>=0.12.0,<0.13.0"]
147
+ requires = ["uv_build>=0.12.0"]
132
148
  build-backend = "uv_build"
133
149
 
134
150
 
@@ -0,0 +1,33 @@
1
+ """signalk_cli — Python clients and CLI for SignalK APIs.
2
+
3
+ The clients are importable from here or from their packages:
4
+
5
+ ```python
6
+ from signalk_cli import HistoryClient, StreamClient, TimeRange
7
+ ```
8
+ """
9
+
10
+ import logging
11
+
12
+ from ._arrow import ArrowTable
13
+ from .errors import SignalKError
14
+ from .history import HistoryClient, HistoryResult, TimeRange
15
+ from .net import discover_host
16
+ from .stream import DeltaMessage, DeltaRow, DeltaStream, StreamClient
17
+
18
+ # Library convention: stay silent unless the application configures logging.
19
+ # The CLI attaches its own stderr handler per command.
20
+ logging.getLogger("signalk_cli").addHandler(logging.NullHandler())
21
+
22
+ __all__ = [
23
+ "ArrowTable",
24
+ "DeltaMessage",
25
+ "DeltaRow",
26
+ "DeltaStream",
27
+ "HistoryClient",
28
+ "HistoryResult",
29
+ "SignalKError",
30
+ "StreamClient",
31
+ "TimeRange",
32
+ "discover_host",
33
+ ]