skillfed

obs-websocket-py

Python library to communicate with an obs-websocket server.

obs-websocket-py v1.0 98.4K downloads/30d#13,090 on PyPI275
Permissive license MIT DORMANT released

What it is and what it does

obs-websocket-py is a Python client library that communicates with OBS Studio's obs-websocket server over WebSocket, allowing you to send commands and receive events from OBS remotely. It supports both the modern v5 protocol (default port 4455) and the legacy v4 protocol (default port 4444). You instantiate a client with a host, port, and optional password, call connect(), then use the call() method to send requests and receive responses, or register callback functions to listen for OBS events.

The package depends only on websocket-client for the underlying WebSocket communication. It's designed for developers who want to automate OBS—controlling scenes, sources, recordings, and streaming—from Python scripts or applications. The library handles connection lifecycle, authentication, and event dispatch, with support for both synchronous request-response calls and asynchronous event callbacks.

Use it for:

  • Automate OBS scene switching and source control from a Python application or bot.
  • Build a custom control panel or dashboard that monitors and manages OBS streaming state.
  • Create event-driven workflows that trigger actions in other tools when OBS events occur.
  • Integrate OBS control into a larger broadcast or recording automation system.
  • Write integration tests or monitoring scripts that verify OBS configuration and state.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Connects Python applications to OBS Studio via the obs-websocket protocol, enabling remote control of OBS through method calls and event callbacks.

Yes, if you need to control OBS Studio from Python. The package is stable (v1.0, MIT licensed, no known vulnerabilities) and has low install friction. However, maintenance is dormant—the last release was 2023-02-20—so if OBS Studio introduces breaking protocol changes, you may need to fork or wait for community updates. For active OBS automation projects, this is a solid choice; for long-term production systems, monitor the repository for compatibility.

Install

obs-websocket-py on PyPI

pip

pip install obs-websocket-py

uv

uv add obs-websocket-py

poetry

poetry add obs-websocket-py

Installing obs-websocket-py

Before you install

Low friction install with a single runtime dependency (websocket-client). Maintenance is dormant—last release was 2023-02-20, but the repository remains active with a commit on 2024-08-09, suggesting occasional updates without formal releases.

License in practice

Licensed under MIT (permissive), so you can use, modify, and distribute this package freely with minimal restrictions, provided you retain the license notice.

Quickstart

pip install obs-websocket-py

from obswebsocket import obsws, requests

client = obsws("localhost", 4455, "secret")
client.connect()
version = client.call(requests.GetVersion()).getObsVersion()
client.disconnect()

Requires a running OBS Studio instance with obs-websocket server enabled on the specified host and port (default 4455 for v5 API, 4444 for legacy v4 API).

Verify before relying

  • Whether the package supports OBS Studio versions released after 2023-02-20 without manual updates.
  • Compatibility with Python 3.11+ (classifiers list only up to 3.10).

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — websocket-client
Maintenance dormant — 1,271 days since the last release
Last repo commit
First released
Downloads 98,351/month — #13,090 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: obs_websocket_py-1.0-py3-none-any.whl

Keywords: obs, obs-studio, websocket

Development Status :: 4 - BetaEnvironment :: PluginsIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries

Tags

obs studio websocket clientobs remote control pythonobs-websocket protocol libraryobs automation pythonobs studio api clientobs streaming controlobs websocket communication
obs-studiostreaming-automationwebsocket-client

More Libraries packages