Skip to main content

pyblu

PyPI PyPI - Python Version PyPI - License

pyblu is an async Python library for controlling BluOS players and reading their status. It connects directly to a player using the BluOS HTTP API, with no authentication required.

Installation

Requires Python 3.12 or newer.

pip install pyblu

Quick start

Replace <host> with your player's hostname or IP address:

import asyncio

from pyblu import Player


async def main():
    async with Player("<host>") as player:
        status = await player.status()
        print(status)


asyncio.run(main())

The connection uses port 11000 by default. Using async with closes the client's HTTP session when you're done.

See the documentation for playback, volume, browsing, play queues, and player grouping.

Audio settings

Use player.settings to read or change audio settings. Which settings are available depends on your player.

Settings get() result How to change it
listening_mode, subwoofer_mode (legacy) Active display name set(name)
replay_gain, output_mode Raw active name set(name)
tone_controls, centre_channel, stereo_surround, digital_passthrough, fixed_volume, audio_clock_trim bool set(True) / set(False)
treble, bass, balance, centre_volume_trim, crossover float set(value)
volume_limits (minimum, maximum) in dB set(minimum, maximum)

Inside the async with block, you can read settings and their available values:

controls_enabled = await player.settings.tone_controls.get()
bass_limits = await player.settings.bass.range()
replay_gain_choices = await player.settings.replay_gain.choices()
  • get() returns None if the setting is missing. For replay_gain and output_mode, it returns the raw active name even if not listed in choices().
  • is_available() checks whether the player lists the setting. For listening and subwoofer modes, it also requires at least one choice.
  • For replay_gain and output_mode, choices() returns entries with name, display_name, and active. Both get() and set() use raw names; use display_name for presentation.
  • The legacy listening_mode and subwoofer_mode APIs retain values() and display-name getters. Their get() also returns None if no choice matches; pass a values() entry's name to set(), not the display name.
  • For numeric settings, range() returns a SettingRange, or None if the setting is missing. It contains minimum, maximum, and optional step, units, and minimum_range (for volume limits). Check these limits before changing a value: set() does not fetch or enforce them.

All settings methods accept a timeout in seconds.

Legacy choice settings

listening_mode and subwoofer_mode preserve their original API for backward compatibility. They differ from the newer choice settings:

Behavior listening_mode, subwoofer_mode replay_gain, output_mode
get() Display label, e.g. "Movie" or "Off" Raw name, e.g. "none" or "default"
set(name) Raw name, not the display label Raw name, same representation as get()
List choices values() choices()
Active name not in choices get() returns None get() returns the raw name
is_available() Requires at least one choice Requires the setting to be present

Do not pass a legacy setting's get() result to set(). Obtain its raw name from the active entry in values() instead:

choices = await player.settings.subwoofer_mode.values()
original_name = next((choice.name for choice in choices if choice.active), None)
# If restoring later, pass original_name to set(), not the display label "Off".

Legacy listening-mode choices are ListeningModeValue objects (including an icon); subwoofer choices are SubwooferModeValue objects. New choice settings return SettingValue objects. All three expose name, display_name, and active.

Development

See the development guide for setup, checks, and releases.

Metadata

Release files for pyblu 2.2.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 pyblu 2.2.0
File Size Uploaded
pyblu-2.2.0.tar.gz 19.5 kB Details

Built distribution (wheel)

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

Total release size: 39.9 kB

Release files / pyblu-2.2.0.tar.gz

Download URL pyblu-2.2.0.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
edcfff3d7596f7567c4bf7c6f07d2476deb23d61504360ad96f5aad4f29c2af3
BLAKE2b-256 checksum
How to use checksums
f8733298f6ff1c402aaff85591c4f13df3d8316138472691cc9ea3ddce79ffdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 14, 2026.

Transparency log

Release files / pyblu-2.2.0-py3-none-any.whl

Download URL pyblu-2.2.0-py3-none-any.whl
Size 20.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
71d18b5481e4fc3c352571dd3aac9a9dea532090ec35b736811cc8725f9e74cb
BLAKE2b-256 checksum
How to use checksums
5d4fe33cd8f5b1466a97e320dfce718759e38f722ca97b7d5a6db26915f95633
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.2.0 This release

2 release files

2.1.0

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

3 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

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