File tree Expand file tree Collapse file tree 4 files changed +69
-4
lines changed Expand file tree Collapse file tree 4 files changed +69
-4
lines changed Original file line number Diff line number Diff line change 12
12
- name : Setup Python
13
13
uses : actions/setup-python@v5
14
14
with :
15
- python-version : " 3.11 "
15
+ python-version : " 3.13 "
16
16
- name : Install dependencies
17
17
run : |
18
18
pip install .
Original file line number Diff line number Diff line change 1
1
# pylw3
2
- Lightware LW3 protocol library
2
+
3
+ [ ![ Tests] ( https://github.com/NitorCreations/pylw3/actions/workflows/unittest.yaml/badge.svg )] ( https://github.com/NitorCreations/pylw3/actions/workflows/unittest.yaml )
4
+ [ ![ Linting] ( https://github.com/NitorCreations/pylw3/actions/workflows/ruff.yaml/badge.svg )] ( https://github.com/NitorCreations/pylw3/actions/workflows/ruff.yaml )
5
+
6
+ Lightware LW3 protocol library for controlling Lightware encoders and decoders.
7
+
8
+ This library uses our [ pytelnetdevice] ( https://github.com/NitorCreations/pytelnetdevice ) library under the hood.
9
+
10
+ ## Usage
11
+
12
+ This is just a basic example, explore the library to and the documentation for the LW3 protocol for your specific
13
+ device to learn more.
14
+
15
+ ``` python
16
+ import asyncio
17
+
18
+ from pylw3 import LW3
19
+
20
+
21
+ async def main ():
22
+ # Connect to a VINX decoder and print the current input
23
+ decoder_device = LW3(" 10.211.0.23" , 6107 )
24
+ async with decoder_device.connection():
25
+ video_channel_id = await decoder_device.get_property(" /SYS/MB/PHY.VideoChannelId" )
26
+ print (video_channel_id)
27
+
28
+ # Connect to a VINX encoder and print whether signal is present
29
+ encoder_device = LW3(" 10.211.0.86" , 6107 )
30
+ async with encoder_device.connection():
31
+ signal_present = await encoder_device.get_property(" /MEDIA/VIDEO/I1.SignalPresent" )
32
+ print (signal_present)
33
+
34
+
35
+ asyncio.run(main())
36
+ ```
37
+
38
+ This will output something like:
39
+
40
+ ```
41
+ 9
42
+ 0
43
+ ```
44
+
45
+ ## License
46
+
47
+ GNU GENERAL PUBLIC LICENSE version 3
Original file line number Diff line number Diff line change
1
+ import asyncio
2
+
3
+ from pylw3 import LW3
4
+
5
+
6
+ async def main ():
7
+ # Connect to a VINX decoder and print the current input
8
+ decoder_device = LW3 ("10.211.0.23" , 6107 )
9
+ async with decoder_device .connection ():
10
+ video_channel_id = await decoder_device .get_property ("/SYS/MB/PHY.VideoChannelId" )
11
+ print (video_channel_id )
12
+
13
+ # Connect to a VINX encoder and print whether signal is present
14
+ encoder_device = LW3 ("10.211.0.86" , 6107 )
15
+ async with encoder_device .connection ():
16
+ signal_present = await encoder_device .get_property ("/MEDIA/VIDEO/I1.SignalPresent" )
17
+ print (signal_present )
18
+
19
+
20
+ asyncio .run (main ())
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ classifiers = [
10
10
" Operating System :: OS Independent" ,
11
11
" Programming Language :: Python :: 3" ,
12
12
]
13
- requires-python = " >=3.11 "
13
+ requires-python = " >=3.13 "
14
14
dependencies = [
15
- " pytelnetdevice @ git+https://github.com/NitorCreations/pytelnetdevice@ab5b48c "
15
+ " pytelnetdevice @ git+https://github.com/NitorCreations/pytelnetdevice@0.2.0 "
16
16
]
17
17
18
18
[tool .ruff ]
You can’t perform that action at this time.
0 commit comments