Welcome to SoCo’s documentation!

SoCo (Sonos Controller) is a high level Python 2/3 library to control your Sonos ® speakers with:

# Import soco and get a SoCo instance
import soco
device = soco.discovery.any_soco()

# Get all albums from the music library that contains the word "Black"
# and add them to the queue
albums = device.music_library.get_albums(search_term='Black')
for album in albums:
    print('Added:', album.title)

# Dial up the volume (just a bit) and play
device.volume += 10

To get up and running quickly with SoCo, start by reading the getting started page, with installation instructions and a small tutorial and then wet your appetite with the micro examples. Then optionally follow up with any of the advanced topics that peak your interest: Speaker Topologies, Events and UPnP Services. Finally dive into the the full module reference documentation.

For support post a question in the SoCo Google group or file an issue on Github.

If you are interested in participating in the development, plase read the development documentation and file a bug or make a pull request on Github.


Indices and tables