Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
wasp-spotify-bindings
Advanced tools
Wrapper around AppleScript of Spotify in Python.
This library provides a simple wrapper around the AppleScript API of the Spotify application on MacOS.
Developed and tested with Python 3.7
pip install wasp-spotify-bindings
python wasp/tests/test_wasp.py
python wasp/tests/test_applescript.py
from wasp_spotify_bindings.core import Wasp
wasp = Wasp()
Get track metadata.
wasp.get_track()
returns
{
'artist': 'Rick Astley',
'album': 'Whenever You Need Somebody',
'disc_number': 1,
'duration': 213573,
'played_count': 0,
'track_number': 1,
'popularity': 75,
'id': 'spotify:track:4uLU6hMCjMI75M1A2tKUQC',
'name': 'Never Gonna Give You Up',
'album_artist':
'Rick Astley',
'artwork_url':
'http://i.scdn.co/image/15ac2c9091d9b74e841b281ceb23ca8208321444',
'spotify_url': 'spotify:track:4uLU6hMCjMI75M1A2tKUQC'
}
Get player state.
wasp.get_state()
returns
{
"track_id": "spotify:track:4uLU6hMCjMI75M1A2tKUQC",
"volume": 49,
"position": 3, # seconds
"state": "playing"
}
Start Spotify application.
wasp.start_spotify()
Quit Spotify application.
wasp.quit_spotify()
Play next track.
wasp.next_track()
Play previous track.
wasp.previous_track()
Play current track.
wasp.play()
Toggle play/pause on current track.
wasp.play_pause()
Pause current track.
wasp.pause()
Set volume to [0-100]
wasp.set_volume(volume=10)
Play track referred to by spotify id.
wasp.play_track(spotify_uri='spotify:track:4uLU6hMCjMI75M1A2tKUQC')
Play track in context of an album/playlist.
wasp.play_track_in_context(
spotify_uri='spotify:track:4uLU6hMCjMI75M1A2tKUQC',
context='spotify:track:4uLU6hMCjMI75M1A2tKUQC'
)
Increase volume by 10.
wasp.volume_up()
Decrease volume by 10.
wasp.volume_down()
Jump to position in song (seconds).
wasp.jump_to(jump_to_second=5)
Check if repeat is enabled.
wasp.is_repeating()
Check if shuffle is enabled.
wasp.is_shuffling()
Set repeating to True
or False
.
wasp.set_repeating(set_repeating=True)
Set shuffling to True
or False
.
wasp.set_shuffling(set_shuffling=True)
Toggle repeat on/off.
wasp.toggle_repeating()
Toggle shuffle on/off.
wasp.toggle_shuffling()
Mute player.
wasp.mute()
Unmute player.
wasp.unmute()
FAQs
Python wrapper to control your Spotify client on MacOS
We found that wasp-spotify-bindings demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.