Skip to content

Commit 3c78afe

Browse files
authored
Merge pull request #11 from Patrick762/bugfix-websockets
Websockets dependency update
2 parents 2a38a2d + 662e9c0 commit 3c78afe

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The docker image allows you to use the streamdeckapi server inside a docker cont
1010

1111
### Usage
1212
```shell
13-
docker run -v /dev/hidraw7:/dev/hidraw7 -p 6153:6153 --privileged ghcr.io/patrick762/streamdeckapi
13+
docker run -v /dev/hidraw7:/dev/hidraw7 -p 6153:6153 --privileged ghcr.io/patrick762/streamdeckapi:main
1414
```
1515

1616
**Note:** You have to change `hidraw7` to the path of your Stream Deck. You can find this path by using `lshid` (https://pypi.org/project/lshid/).

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
1010
long_description = "\n" + fh.read()
1111

12-
VERSION = "0.0.11"
12+
VERSION = "0.0.12"
1313
DESCRIPTION = "Stream Deck API Library"
1414

1515
# Setting up
@@ -25,7 +25,7 @@
2525
packages=find_packages(),
2626
install_requires=[
2727
"requests",
28-
"websockets==11.0.2",
28+
"websockets>=13.1",
2929
"aiohttp>=3.8",
3030
"human-readable-ids==0.1.3",
3131
"jsonpickle==3.0.1",

test.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import asyncio
2+
import json
3+
from streamdeckapi import SDWebsocketMessage, StreamDeckApi
4+
5+
async def __main__():
6+
deck = StreamDeckApi("localhost")
7+
info = await deck.get_info(False)
8+
9+
if info is None:
10+
print("Error getting info")
11+
return
12+
13+
print(json.dumps(info))
14+
15+
loop = asyncio.get_event_loop()
16+
loop.run_until_complete(__main__())

test.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
# Only used for development!
3+
#
4+
5+
# Start a server
6+
#docker run -v /dev/hidraw7:/dev/hidraw7 -p 6153:6153 --privileged --detached ghcr.io/patrick762/streamdeckapi:main
7+
8+
# Run python tests
9+
python test.py

0 commit comments

Comments
 (0)