mirror of
https://github.com/onyx-and-iris/obsws-python.git
synced 2026-04-18 14:03:32 +00:00
import Callable, Iterable from collections.abs instead of typing.
update tests to reflect changes in the API. reorganise hatch envs add black,isort configs to pyproject.toml add pre-commit config
This commit is contained in:
26
README.md
26
README.md
@@ -1,5 +1,6 @@
|
||||
[](https://badge.fury.io/py/obsws-python)
|
||||
[](https://github.com/aatikturk/obsstudio_sdk/blob/main/LICENSE)
|
||||
[][obsws-events]
|
||||
[](https://github.com/psf/black)
|
||||
[](https://pycqa.github.io/isort/)
|
||||
|
||||
@@ -92,7 +93,7 @@ resp = cl_req.send("GetVersion", raw=True)
|
||||
print(f"response data: {resp}")
|
||||
```
|
||||
|
||||
For a full list of requests refer to [Requests](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#requests)
|
||||
For a full list of requests refer to [Requests][obsws-reqs]
|
||||
|
||||
### Events
|
||||
|
||||
@@ -125,7 +126,7 @@ cl.callback.deregister(on_input_mute_state_changed)
|
||||
|
||||
`register(fns)` and `deregister(fns)` accept both single functions and lists of functions.
|
||||
|
||||
For a full list of events refer to [Events](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#events)
|
||||
For a full list of events refer to [Events][obsws-events]
|
||||
|
||||
### Attributes
|
||||
|
||||
@@ -149,7 +150,7 @@ def on_scene_created(data):
|
||||
- The following attributes are available:
|
||||
- `req_name`: name of the request.
|
||||
- `code`: request status code.
|
||||
- For a full list of status codes refer to [Codes](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#requeststatus)
|
||||
- For a full list of status codes refer to [Codes][obsws-codes]
|
||||
|
||||
### Logging
|
||||
|
||||
@@ -168,18 +169,19 @@ logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
### Tests
|
||||
|
||||
First install development dependencies:
|
||||
Install [hatch][hatch-install] and then:
|
||||
|
||||
`pip install -e .['dev']`
|
||||
|
||||
To run all tests:
|
||||
|
||||
```
|
||||
pytest -v
|
||||
```
|
||||
`hatch test`
|
||||
|
||||
### Official Documentation
|
||||
|
||||
For the full documentation:
|
||||
|
||||
- [OBS Websocket SDK](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#obs-websocket-501-protocol)
|
||||
- [OBS Websocket SDK][obsws-pro]
|
||||
|
||||
|
||||
[obsws-reqs]: https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#requests
|
||||
[obsws-events]: https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#events
|
||||
[obsws-codes]: https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#requeststatus
|
||||
[obsws-pro]: https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#obs-websocket-501-protocol
|
||||
[hatch-install]: https://hatch.pypa.io/latest/install/
|
||||
|
||||
Reference in New Issue
Block a user