Skip to main content

A python library and cli for the Bose SoundTouch (R) API.

To be able to use my Bose Soundtouch 10 from the command line.

And to be able to use it as library for Home-Assistant https://home-assistant.io/

And to be ‘my first pip’ package :-)

Installation

To install boos python library, simply:

pip install boos

boos requires Python >= 3.4.

Quick Start

Connect to your Bose SoundTouch (R) device and activate preset 3

To work in python:

from boos import Boos

booz = Boos("http://boos.fritz.box:8090")
booz.preset(3)
booz.vol()
booz.vol(30)

Or if you can run python 3 code for example on Linux:

# create a symbolic link to the cli.py
# and (for now) be sure in cli.py you have the right url defined
sudo ln -s ./boos/cli.py /usr/local/bin/boos
# run
boos
boos set 3
boos vol
boos vol 30
Or create a virtualenv and create some bash file::

virtualenv -p python3 boos cd boos pip install boos

# and a bash file like:

#!/bin/bash

source /home/richard/venv/boos/bin/activate /home/richard/dev/boos/boos/cli.py “$@”

Packaging

All from https://python-packaging-user-guide.readthedocs.org/en/latest/distributing/#source-distributions

# source dist
python3 setup.py sdist
# creating a universal wheel?
python3 setup.py bdist_wheel

# now setup a local webserver to test
cd dist
python -m SimpleHTTPServer 9000

# and in another terminal
# create a python 3 virtual environment venv (all as usual)
virtualenv -p python3 venv
cd venv
source bin/activate
# now in python
python3
>>> from boos import Boos
>>> booz = Boos("http://boos.fritz.box:8090")
>>> booz.preset(3)            # setting to preset 3
>>> print(booz.now_playing()) # should show current playing song/source

# https://packaging.python.org/en/latest/distributing/#uploading-your-project-to-pypi
#
# create a .pypirc file in home dir
[distutils]
index-servers=
    pypi
    testpypi

[testpypi]
repository = https://testpypi.python.org/pypi
username = <your user name goes here>
password = <your password goes here>

[pypi]
repository = https://pypi.python.org/pypi
username = <your user name goes here>
password = <your password goes here>
#
# to upload it to testpypi (https://wiki.python.org/moin/TestPyPI)
# first register the project
python setup.py register -r https://testpypi.python.org/pypi
# preferred (given you have username and testpypi as key in .pypirc:
twine upload -r testpypi dist/*
# or
python setup.py sdist upload -r https://testpypi.python.org/pypi
# after upload install via
# search
pip search --index https://testpypi.python.org/pypi boos
# install
pip install -i https://testpypi.python.org/pypi boos

# or to pypi
# preferred:
# first register project
python setup.py register
# preferred (given you have username and testpypi as key in .pypirc:
twine upload -r pypi dist/*
# or
python setup.py sdist upload -r https://pypi.python.org/pypi
# and install
pip install boos

Release files for boos 0.5.3

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

Source distribution (sdist)

Source distribution for boos 0.5.3
File Size Uploaded
boos-0.5.3.tar.gz 5.8 kB Details

Release files / boos-0.5.3.tar.gz

Download URL boos-0.5.3.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
739cab74e2fb4b53499c652c4ae9e715d4c6c358f39cdc1b3f9796ae06d3688e
BLAKE2b-256 checksum
How to use checksums
33f60bca27b795e9668922375d6db39c3dddb8fb2a7ebd30ed7e84e0534bc56d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.5.3 This release

1 release file

0.5.2

0.5.0

1 release file

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