wildtrax-client 0.1.0__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.
- wildtrax_client-0.1.0/LICENSE +21 -0
- wildtrax_client-0.1.0/PKG-INFO +114 -0
- wildtrax_client-0.1.0/README.md +97 -0
- wildtrax_client-0.1.0/pyproject.toml +34 -0
- wildtrax_client-0.1.0/setup.cfg +4 -0
- wildtrax_client-0.1.0/src/wildtrax_client/__init__.py +30 -0
- wildtrax_client-0.1.0/src/wildtrax_client/client.py +475 -0
- wildtrax_client-0.1.0/src/wildtrax_client/errors.py +40 -0
- wildtrax_client-0.1.0/src/wildtrax_client.egg-info/PKG-INFO +114 -0
- wildtrax_client-0.1.0/src/wildtrax_client.egg-info/SOURCES.txt +12 -0
- wildtrax_client-0.1.0/src/wildtrax_client.egg-info/dependency_links.txt +1 -0
- wildtrax_client-0.1.0/src/wildtrax_client.egg-info/top_level.txt +1 -0
- wildtrax_client-0.1.0/tests/test_protocol.py +214 -0
- wildtrax_client-0.1.0/tests/test_routes.py +197 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Halter Technical
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: wildtrax-client
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python client for the WildTrax 2027 HTTP /api control surface
|
|
5
|
+
Author: Halter Technical
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://wildtrax.io
|
|
8
|
+
Project-URL: Documentation, https://wildtrax.io/resources/python-client
|
|
9
|
+
Keywords: wildtrax,audio,recording,remote,osc,control
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Topic :: Multimedia :: Sound/Audio
|
|
13
|
+
Requires-Python: >=3.8
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Dynamic: license-file
|
|
17
|
+
|
|
18
|
+
# PyWildTrax
|
|
19
|
+
|
|
20
|
+
A small, dependency-free Python client for the **WildTrax 2027** HTTP `/api`
|
|
21
|
+
control surface. Drive recording, tracks, metadata, the soundboard, the playlist,
|
|
22
|
+
and more from scripts — the same actions the OSC protocol exposes, over plain HTTP.
|
|
23
|
+
|
|
24
|
+
Built on the Python standard library only (`urllib`) — no `requests`, no extra
|
|
25
|
+
installs, works anywhere Python 3.8+ runs.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install wildtrax-client
|
|
31
|
+
# or, from a checkout:
|
|
32
|
+
pip install -e .
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
> Install as **`wildtrax-client`**, import as **`wildtrax_client`**:
|
|
36
|
+
> ```python
|
|
37
|
+
> from wildtrax_client import WildTrax
|
|
38
|
+
> ```
|
|
39
|
+
|
|
40
|
+
## Quick start
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
from wildtrax_client import WildTrax
|
|
44
|
+
|
|
45
|
+
wt = WildTrax("192.168.1.155") # default HTTP port 5659
|
|
46
|
+
wt.wait_for_approval() # blocks until the host approves this device
|
|
47
|
+
|
|
48
|
+
wt.metadata.scene("SC07")
|
|
49
|
+
wt.transport.record()
|
|
50
|
+
# ...
|
|
51
|
+
wt.transport.stop()
|
|
52
|
+
|
|
53
|
+
print(wt.session_state())
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Approval model
|
|
57
|
+
|
|
58
|
+
WildTrax has no passwords — security is the host approving devices on the LAN.
|
|
59
|
+
The **first** request from a new device shows up as *pending* in the desktop
|
|
60
|
+
**Session Manager** and the client gets `202`. A human approves it once (and grants
|
|
61
|
+
**Write** for write actions like recording). After that, the device is remembered.
|
|
62
|
+
|
|
63
|
+
- `wt.wait_for_approval(timeout=120)` — poll until approved, or raise.
|
|
64
|
+
- Or catch `PendingApprovalError` yourself and retry.
|
|
65
|
+
- `wt.is_approved()` / `wt.can_write()` — check status without blocking.
|
|
66
|
+
|
|
67
|
+
The server must have a **fixed HTTP port** enabled (Session Manager → Advanced →
|
|
68
|
+
*Fixed network ports*) so the port is stable; otherwise it binds an ephemeral one.
|
|
69
|
+
|
|
70
|
+
## API
|
|
71
|
+
|
|
72
|
+
Methods are grouped to mirror the `/api` route families:
|
|
73
|
+
|
|
74
|
+
| Namespace | Examples |
|
|
75
|
+
|---|---|
|
|
76
|
+
| `wt.transport` | `record()`, `stop()`, `false_start()` |
|
|
77
|
+
| `wt.tracks` | `arm(i)`, `mute(i, True)`, `pan(i, 2)`, `name(i, "Boom")`, `add()`, `remove(i)`, `set_count(n)` |
|
|
78
|
+
| `wt.metadata` | `scene("SC07")`, `take("T001")`, `note(...)`, `add_marker()`, `next_scene(...)`, `reset_next()`, `auto_increment("take", True)` |
|
|
79
|
+
| `wt.config` | `preroll(True)`, `meter_smoothness(0.5)`, `global_monitor(True)`, `playback_volume(80)`, `matrix_cell("input", 1, 1)` |
|
|
80
|
+
| `wt.soundboard` | `play(1)`, `stop(1)`, `add_pad()`, `title(1, "FX")`, `repeat(1, True)`, `trigger_mode(1, 1)`, `routing_mode(1, 5)`, `routing_cell(1, 1, 2, 1.0)` |
|
|
81
|
+
| `wt.playlist` | `play()`, `stop()`, `loop(True)`, `index(2)`, `add_row()`, `row_title(1, "Cue")`, `row_routing_mode(1, 0)` |
|
|
82
|
+
| `wt.export` | `add()`, `remove(i)`, `update(i, "name", "Mix")`, `toggle_track(f, t)` |
|
|
83
|
+
| `wt.report` | `csv()`, `auto_save(True)`, `edit_entry(3, "circled", True)` |
|
|
84
|
+
|
|
85
|
+
> **Indices are 1-based.** Every index argument (`i`, pad index, row index, file
|
|
86
|
+
> index) is 1-based, matching the WildTrax UI (Track 1, Input 1) and the OSC
|
|
87
|
+
> surface — `wt.tracks.mute(1)` mutes the track shown as "Track 1". The server
|
|
88
|
+
> converts to its 0-based models at the HTTP seam.
|
|
89
|
+
|
|
90
|
+
Readback: `wt.session_state()`, `wt.recording()`, `wt.get_tracks()`,
|
|
91
|
+
`wt.get_metadata()`, `wt.report.csv()`. Per-element reads (1-based, mirror the OSC
|
|
92
|
+
flat read-side): `wt.get_pad(i)`, `wt.get_playlist_row(i)`, `wt.get_export_file(i)`,
|
|
93
|
+
`wt.get_matrix(which)`, `wt.get_soundreport_entry(i)`, `wt.get_session_client(i)`.
|
|
94
|
+
|
|
95
|
+
> **Session administration** (approving/kicking clients, permissions, renaming the
|
|
96
|
+
> session) is **not** available remotely — it's reserved for the desktop host.
|
|
97
|
+
|
|
98
|
+
## Errors
|
|
99
|
+
|
|
100
|
+
All raise subclasses of `WildTraxError`:
|
|
101
|
+
|
|
102
|
+
| Exception | Meaning (HTTP) |
|
|
103
|
+
|---|---|
|
|
104
|
+
| `ConnectionFailed` | host unreachable |
|
|
105
|
+
| `PendingApprovalError` | `202` — awaiting approval |
|
|
106
|
+
| `PermissionDenied` | `403` — approved but no Write |
|
|
107
|
+
| `NotFound` | `404` — bad route or index |
|
|
108
|
+
| `RecordingInProgress` | `409` — blocked while recording |
|
|
109
|
+
| `RateLimited` | `429` — transport command debounced |
|
|
110
|
+
| `BadRequest` | `400` — malformed body |
|
|
111
|
+
|
|
112
|
+
## License
|
|
113
|
+
|
|
114
|
+
MIT
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# PyWildTrax
|
|
2
|
+
|
|
3
|
+
A small, dependency-free Python client for the **WildTrax 2027** HTTP `/api`
|
|
4
|
+
control surface. Drive recording, tracks, metadata, the soundboard, the playlist,
|
|
5
|
+
and more from scripts — the same actions the OSC protocol exposes, over plain HTTP.
|
|
6
|
+
|
|
7
|
+
Built on the Python standard library only (`urllib`) — no `requests`, no extra
|
|
8
|
+
installs, works anywhere Python 3.8+ runs.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install wildtrax-client
|
|
14
|
+
# or, from a checkout:
|
|
15
|
+
pip install -e .
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
> Install as **`wildtrax-client`**, import as **`wildtrax_client`**:
|
|
19
|
+
> ```python
|
|
20
|
+
> from wildtrax_client import WildTrax
|
|
21
|
+
> ```
|
|
22
|
+
|
|
23
|
+
## Quick start
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
from wildtrax_client import WildTrax
|
|
27
|
+
|
|
28
|
+
wt = WildTrax("192.168.1.155") # default HTTP port 5659
|
|
29
|
+
wt.wait_for_approval() # blocks until the host approves this device
|
|
30
|
+
|
|
31
|
+
wt.metadata.scene("SC07")
|
|
32
|
+
wt.transport.record()
|
|
33
|
+
# ...
|
|
34
|
+
wt.transport.stop()
|
|
35
|
+
|
|
36
|
+
print(wt.session_state())
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Approval model
|
|
40
|
+
|
|
41
|
+
WildTrax has no passwords — security is the host approving devices on the LAN.
|
|
42
|
+
The **first** request from a new device shows up as *pending* in the desktop
|
|
43
|
+
**Session Manager** and the client gets `202`. A human approves it once (and grants
|
|
44
|
+
**Write** for write actions like recording). After that, the device is remembered.
|
|
45
|
+
|
|
46
|
+
- `wt.wait_for_approval(timeout=120)` — poll until approved, or raise.
|
|
47
|
+
- Or catch `PendingApprovalError` yourself and retry.
|
|
48
|
+
- `wt.is_approved()` / `wt.can_write()` — check status without blocking.
|
|
49
|
+
|
|
50
|
+
The server must have a **fixed HTTP port** enabled (Session Manager → Advanced →
|
|
51
|
+
*Fixed network ports*) so the port is stable; otherwise it binds an ephemeral one.
|
|
52
|
+
|
|
53
|
+
## API
|
|
54
|
+
|
|
55
|
+
Methods are grouped to mirror the `/api` route families:
|
|
56
|
+
|
|
57
|
+
| Namespace | Examples |
|
|
58
|
+
|---|---|
|
|
59
|
+
| `wt.transport` | `record()`, `stop()`, `false_start()` |
|
|
60
|
+
| `wt.tracks` | `arm(i)`, `mute(i, True)`, `pan(i, 2)`, `name(i, "Boom")`, `add()`, `remove(i)`, `set_count(n)` |
|
|
61
|
+
| `wt.metadata` | `scene("SC07")`, `take("T001")`, `note(...)`, `add_marker()`, `next_scene(...)`, `reset_next()`, `auto_increment("take", True)` |
|
|
62
|
+
| `wt.config` | `preroll(True)`, `meter_smoothness(0.5)`, `global_monitor(True)`, `playback_volume(80)`, `matrix_cell("input", 1, 1)` |
|
|
63
|
+
| `wt.soundboard` | `play(1)`, `stop(1)`, `add_pad()`, `title(1, "FX")`, `repeat(1, True)`, `trigger_mode(1, 1)`, `routing_mode(1, 5)`, `routing_cell(1, 1, 2, 1.0)` |
|
|
64
|
+
| `wt.playlist` | `play()`, `stop()`, `loop(True)`, `index(2)`, `add_row()`, `row_title(1, "Cue")`, `row_routing_mode(1, 0)` |
|
|
65
|
+
| `wt.export` | `add()`, `remove(i)`, `update(i, "name", "Mix")`, `toggle_track(f, t)` |
|
|
66
|
+
| `wt.report` | `csv()`, `auto_save(True)`, `edit_entry(3, "circled", True)` |
|
|
67
|
+
|
|
68
|
+
> **Indices are 1-based.** Every index argument (`i`, pad index, row index, file
|
|
69
|
+
> index) is 1-based, matching the WildTrax UI (Track 1, Input 1) and the OSC
|
|
70
|
+
> surface — `wt.tracks.mute(1)` mutes the track shown as "Track 1". The server
|
|
71
|
+
> converts to its 0-based models at the HTTP seam.
|
|
72
|
+
|
|
73
|
+
Readback: `wt.session_state()`, `wt.recording()`, `wt.get_tracks()`,
|
|
74
|
+
`wt.get_metadata()`, `wt.report.csv()`. Per-element reads (1-based, mirror the OSC
|
|
75
|
+
flat read-side): `wt.get_pad(i)`, `wt.get_playlist_row(i)`, `wt.get_export_file(i)`,
|
|
76
|
+
`wt.get_matrix(which)`, `wt.get_soundreport_entry(i)`, `wt.get_session_client(i)`.
|
|
77
|
+
|
|
78
|
+
> **Session administration** (approving/kicking clients, permissions, renaming the
|
|
79
|
+
> session) is **not** available remotely — it's reserved for the desktop host.
|
|
80
|
+
|
|
81
|
+
## Errors
|
|
82
|
+
|
|
83
|
+
All raise subclasses of `WildTraxError`:
|
|
84
|
+
|
|
85
|
+
| Exception | Meaning (HTTP) |
|
|
86
|
+
|---|---|
|
|
87
|
+
| `ConnectionFailed` | host unreachable |
|
|
88
|
+
| `PendingApprovalError` | `202` — awaiting approval |
|
|
89
|
+
| `PermissionDenied` | `403` — approved but no Write |
|
|
90
|
+
| `NotFound` | `404` — bad route or index |
|
|
91
|
+
| `RecordingInProgress` | `409` — blocked while recording |
|
|
92
|
+
| `RateLimited` | `429` — transport command debounced |
|
|
93
|
+
| `BadRequest` | `400` — malformed body |
|
|
94
|
+
|
|
95
|
+
## License
|
|
96
|
+
|
|
97
|
+
MIT
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "wildtrax-client"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Python client for the WildTrax 2027 HTTP /api control surface"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [{ name = "Halter Technical" }]
|
|
14
|
+
keywords = ["wildtrax", "audio", "recording", "remote", "osc", "control"]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Operating System :: OS Independent",
|
|
18
|
+
"Topic :: Multimedia :: Sound/Audio",
|
|
19
|
+
]
|
|
20
|
+
# Intentionally zero runtime dependencies -- the client is built on the stdlib
|
|
21
|
+
# (urllib) so it installs cleanly anywhere with no version conflicts.
|
|
22
|
+
dependencies = []
|
|
23
|
+
|
|
24
|
+
[project.urls]
|
|
25
|
+
Homepage = "https://wildtrax.io"
|
|
26
|
+
Documentation = "https://wildtrax.io/resources/python-client"
|
|
27
|
+
|
|
28
|
+
[tool.setuptools.packages.find]
|
|
29
|
+
where = ["src"]
|
|
30
|
+
|
|
31
|
+
# Single source of truth for the version: src/wildtrax_client/__init__.py's __version__.
|
|
32
|
+
# Bump it there for each release; pyproject (and thus the built dist) follows.
|
|
33
|
+
[tool.setuptools.dynamic]
|
|
34
|
+
version = { attr = "wildtrax_client.__version__" }
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"""wildtrax-client -- Python client for the WildTrax 2027 HTTP /api control surface."""
|
|
2
|
+
|
|
3
|
+
from .client import WildTrax, DEFAULT_PORT
|
|
4
|
+
from .errors import (
|
|
5
|
+
WildTraxError,
|
|
6
|
+
ConnectionFailed,
|
|
7
|
+
PendingApprovalError,
|
|
8
|
+
PermissionDenied,
|
|
9
|
+
NotFound,
|
|
10
|
+
RecordingInProgress,
|
|
11
|
+
RateLimited,
|
|
12
|
+
BadRequest,
|
|
13
|
+
ServerError,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
__version__ = "0.1.0"
|
|
17
|
+
|
|
18
|
+
__all__ = [
|
|
19
|
+
"WildTrax",
|
|
20
|
+
"DEFAULT_PORT",
|
|
21
|
+
"WildTraxError",
|
|
22
|
+
"ConnectionFailed",
|
|
23
|
+
"PendingApprovalError",
|
|
24
|
+
"PermissionDenied",
|
|
25
|
+
"NotFound",
|
|
26
|
+
"RecordingInProgress",
|
|
27
|
+
"RateLimited",
|
|
28
|
+
"BadRequest",
|
|
29
|
+
"ServerError",
|
|
30
|
+
]
|