Registry / communication / soco

soco

JSON →
library0.31.0pypypi✓ verified 34d ago

SoCo is a Python library for controlling Sonos speakers. It provides a simple interface to discover, query, and control Sonos devices over a local network. Current version 0.31.0 supports Python >=3.6, with releases approximately every few months.

communicationhttp-networking
Install & Compatibility
Where this runs
tested against v0.31.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.978s · 34.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.9s · import 0.864s · 35MB
33MB installed
● package 33MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SoCo is a class, not a module

from soco import SoCo

Quickstart: import SoCo, create instance with IP, control playback, volume, and get track info.

from soco import SoCo # Discover a speaker by IP (replace with your speaker's IP) speaker = SoCo('192.168.1.10') # Play music (e.g., a URI) speaker.play_uri('x-rincon-mp3radio://stream.example.com:8000/stream') # Adjust volume speaker.volume = 30 # Get current track info track = speaker.get_current_track_info() print(track.title)
Debug
Known footguns
gotchaSoCo only works on the same local network as Sonos speakers. It does not support cloud control or remote access.
gotchaSpeaker IP addresses can change (DHCP). It is recommended to use discovery methods like `soco.discover` instead of hardcoding IPs.
breakingIn v0.30.0, the `play_uri` method signature changed: the `meta` parameter was removed and `title` and `metadata` parameters were added.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
50 hits · last 30 days
petalbot
12
gptbot
4
ahrefsbot
4
amazonbot
3
claudebot
2
script
1
bingbot
1
perplexity-bot
1
Resources