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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.978s · 34.3MB
glibcpy 3.10–3.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
✓ from soco import SoCo
✗ import soco
SoCo is a class, not a module
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)
Errors
Common errors & fixes
AttributeError: module 'soco' has no attribute 'SoCo'
Incorrect import: using `import soco` and then `soco.SoCo()` is wrong.
fixUse `from soco import SoCo` or `import soco; soco.SoCo`
soco.exceptions.SoCoException: No response from the device
Speaker IP is wrong or speaker is not reachable on the network.
fixVerify the IP address and network connectivity. Use `ping` or discovery methods.
TypeError: play_uri() got unexpected keyword argument 'meta'
Using deprecated `meta` parameter in SoCo v0.30+.
fixReplace `meta` with `title` and/or `metadata` keyword arguments.
Upgrade
Version history
0.31.1latest on PyPI · released May 25, 2026
Audit
Dependencies
requestsrequiredHTTP requests to Sonos devices
urllib3requiredUsed internally for HTTP