Skip to main content

pysqueezebox - Asynchronous control of squeezeboxes

This a library to control a Logitech Media Server asynchronously, intended for integration with Home Assistant.

Much of the code was adapted from the Home Assistant squeezebox integration. The current convention is for all API-specific code to be part of a third party library hosted on PyPi, so I created a separate library.

The function names track the terms used by the LMS API, so they do not all match the old Home Assistant squeezebox integration.

Thank you to the original author of the squeezebox integration. If it is you, please let me know so I can credit you here.

Usage

Install pysqueezebox from github, or using PyPi via pip.

$ pip3 install pysqueezebox

Imports

Import the Server() and Player() classes from this module. You will also need to create an aiohttp.ClientSession() that the module will use to communicate with the Logitech Media Server.

You can use Server.async_get_players() to retrieve a list of connected players, or get a specific player using Server.async_get_player(name="PlayerName"). Remember that any method starting with "async_" is a coroutine that must be preceded by an await to run.

For more information on using aiohttp.ClientSession(), see https://aiohttp.readthedocs.io/en/stable/client_reference.html.

from pysqueezebox import Server, Player
import aiohttp
import asyncio
SERVER = '192.168.1.2' # ip address of Logitech Media Server

async def main():
    async with aiohttp.ClientSession() as session:
        lms = Server(session, SERVER)
        player = await lms.async_get_player(name="Bedroom")
	await player.async_update()
	print(player.album)
	await player.async_play()

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

Player.async_update()

The Player object stores information about the current status of the player. This allows you to retrieve the player's properties without any I/O. Remember to call Player.async_update() prior to retrieving properties if you want the most up-to-date information.

Player() class

Most of the useful functions are in the Player class. More documentation to follow, but in the meantime, the docstrings should be instructive.

Metadata

Release files for pysqueezebox 0.14.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysqueezebox 0.14.0
File Size Uploaded Provenance Actions
pysqueezebox-0.14.0.tar.gz 31.6 kB With provenance Details for pysqueezebox-0.14.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pysqueezebox 0.14.0
File Interpreter ABI Platform Actions
pysqueezebox-0.14.0-py3-none-any.whl Python 3 none any Details for pysqueezebox-0.14.0-py3-none-any.whl

Total release size: 57.6 kB

Release files / pysqueezebox-0.14.0.tar.gz

Download URL pysqueezebox-0.14.0.tar.gz
Size 31.6 kB
Tags Source
SHA-256 checksum
How to use checksums
077021d80413168d3b08660e5cff988087d4ca50ad6789482c53266776c0aa0a
BLAKE2b-256 checksum
How to use checksums
f6226abbd228bd92544bdd75d2c0df326e8a0fe45ad6cb6a9334c8ffcfddbe89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 13, 2026.

Transparency log

Release files / pysqueezebox-0.14.0-py3-none-any.whl

Download URL pysqueezebox-0.14.0-py3-none-any.whl
Size 26.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fbd3cc6ebf628b8baffd5e054c2c8c8c553fad7192d9a0e48abea2f37d577e70
BLAKE2b-256 checksum
How to use checksums
50757d0d8db483d2c3fc277882aa6b6ea373b4e835255963e820fbba4249e8ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 13, 2026.

Transparency log

Security for pysqueezebox 0.14.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pysqueezebox-0.14.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.14.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page