mirror of
https://github.com/onyx-and-iris/streamlabs-socketio-py
synced 2026-04-07 13:43:30 +00:00
remove black, isort badges, add ruff badge
patch bump
This commit is contained in:
15
README.md
15
README.md
@@ -1,8 +1,7 @@
|
||||
[](https://badge.fury.io/py/streamlabsio)
|
||||
[](https://github.com/onyx-and-iris/streamlabs-socketio-py/blob/dev/LICENSE)
|
||||
[](https://python-poetry.org/)
|
||||
[](https://github.com/psf/black)
|
||||
[](https://pycqa.github.io/isort/)
|
||||
[](https://github.com/astral-sh/ruff)
|
||||
|
||||
# A Python client for Streamlabs Socket API
|
||||
|
||||
@@ -43,19 +42,19 @@ import streamlabsio
|
||||
|
||||
|
||||
def on_twitch_event(event, data):
|
||||
print(f"{event}: {data.attrs()}")
|
||||
print(f'{event}: {data.attrs()}')
|
||||
|
||||
|
||||
def main():
|
||||
with streamlabsio.connect(token="<apikey>") as client:
|
||||
client.obs.on("streamlabs", on_twitch_event)
|
||||
client.obs.on("twitch_account", on_twitch_event)
|
||||
with streamlabsio.connect(token='<apikey>') as client:
|
||||
client.obs.on('streamlabs', on_twitch_event)
|
||||
client.obs.on('twitch_account', on_twitch_event)
|
||||
|
||||
# run for 30 seconds then disconnect client from server
|
||||
client.sio.sleep(30)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
```
|
||||
|
||||
@@ -83,7 +82,7 @@ example:
|
||||
|
||||
```python
|
||||
def on_twitch_event(event, data):
|
||||
print(f"{event}: {data.attrs()}")
|
||||
print(f'{event}: {data.attrs()}')
|
||||
```
|
||||
|
||||
### Errors
|
||||
|
||||
Reference in New Issue
Block a user