Skip to main content

A command line interface for spotifython intended for use with spotifyd

Project description

A command line interface to the Spotify API using spotifython as a backend. This tool is developed for the use in scripting on linux and is integrated with the spotifyd player. All API access except playback modification is readonly.

Installation

python 3.10 or higher is required

# Linux/macOS
python3 -m pip install -U spotifython-cli
# Windows
py -3 -m pip install -U spotifython-cli

To install the development version, run:

git clone https://github.com/vawvaw/spotifython-cli
cd spotipython-cli
python3 -m pip install -U .

Dependencies

  • spotifyd for player integration

  • dmenu for interactive selection of content

Example

spotifython-cli play

With dmenu:

spotifython-cli queue playlist --playlist-dmenu --dmenu

Or for scripting:

spotifython-cli metadata --format "{title:.30} - {artist_name:.18}"

Config

~/.config/spotifython-cli/config

[Authentication]
client_id = "your client id
client_secret = "your client secret"
# alternative to client_secret
client_secret_command = "cat /path/to/client_secret"

[spotifyd]
notify = true   # optional

[playback]
device_id = "your playback device"  # optional

[interface]
# dmenu with custom options or a program with a similar interface (gets options on stdin and writes results to stdout)
dmenu_cmdline = dmenu -i -l 50 -p {prompt} # optional

For help on how to obtain client id and secret refer to the spotifython documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spotifython-cli-0.2.1.tar.gz (19.3 kB view hashes)

Uploaded Source

Built Distribution

spotifython_cli-0.2.1-py3-none-any.whl (19.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page