Skip to main content

sonos_extras

Latest PyPI version

Some extra useful commands for Sonos systems, based on SoCo.

Usage

Simple example:

from sonos_extras import SonosExtras
client = SonosExtras("192.168.1.10") # replace with your speaker's IP
client.get_current_track_info()

Methods

stop_after() : stops after the current track is finished

Command Line Interface

Use SonosExtrasCLI as a shell command:

usage: --help [-h] [-i SPEAKER_IP] {version,ver,current,c,play,p,pause,stop,s,playlists,pls,volume,v,line_in,li,stop_after,sa,resume_queue,rq,queue,q} ...

optional arguments:
-h, --help            show this help message and exit
-i SPEAKER_IP, --speaker-ip SPEAKER_IP
                        IP of the speaker to connect to.
                        Also can be set as SONOS_EXTRAS_IP environment variable

sub-commands:
Valid sub-commands. Use -h for each sub-commands to get detailed help.

{version,ver,current,c,play,p,pause,stop,s,playlists,pls,volume,v,line_in,li,stop_after,sa,resume_queue,rq,queue,q}
    version (ver)       Print the current version.
    current (c)         Print the current status, and playback item, if available.
    play (p)            Play.
    pause (p)           Pause.
    stop (s)            Stop.
    playlists (pls)     List sonos playlists.
    volume (v)          Get/set the volume
    line_in (li)        Select LineIn for playback.
    stop_after (sa)     Stop after the current/future track(s).
    resume_queue (rq)   Resume playback from the given index of the current queue.
    queue (q)           Print the current queue.

Installation

pip install sonos-extras

Requirements

python 3.8

Compatibility

Python 3.8

Licence

The MIT License (MIT)

Copyright (c) 2019 MaziarA

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Authors

sonos_extras was written by MaziarA.

Metadata

Release files for sonos-extras 0.1.20

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

Source distribution (sdist)

Source distribution for sonos-extras 0.1.20
File Size Uploaded Provenance Actions
sonos_extras-0.1.20.tar.gz 9.6 kB Without provenance Details for sonos_extras-0.1.20.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sonos-extras 0.1.20
File Interpreter ABI Platform Actions
sonos_extras-0.1.20-py3-none-any.whl Python 3 none any Details for sonos_extras-0.1.20-py3-none-any.whl

Total release size: 19.6 kB

Release files / sonos_extras-0.1.20.tar.gz

Download URL sonos_extras-0.1.20.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b5e3b92ee25890deb56fe28eaeb983f5efea4a1ffa5c713957e10a56aae700a4
BLAKE2b-256 checksum
How to use checksums
59821f07ccf6c893c7bb07a18dc00df68f19516f5410439999dc5174f4f9fad0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.11

Release files / sonos_extras-0.1.20-py3-none-any.whl

Download URL sonos_extras-0.1.20-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
efaa93e436e1e5894a38ea0be3aaa3fbef947f08365ebb2ebf679545bdfa23d8
BLAKE2b-256 checksum
How to use checksums
c12959e44435d5e13ca2cce405fcbb6e39681a01fc1cff1f36deac925950b847
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.11

Security for sonos-extras 0.1.20

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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