gmusicapi allows control of
Google Music <http://music.google.com>
__ with Python.
.. code-block:: python
from gmusicapi import Mobileclient
api = Mobileclient()
# after running api.perform_oauth() once:
api.oauth_login('<a previously-registered device id>')
# => True
library = api.get_all_songs()
sweet_track_ids = [track['id'] for track in library
if track['artist'] == 'The Cat Empire']
playlist_id = api.create_playlist('Rad muzak')
api.add_songs_to_playlist(playlist_id, sweet_track_ids)
gmusicapi is not supported nor endorsed by Google.
That said, it's actively maintained, and powers a bunch of cool projects:
one designed for the visually impaired <https://github.com/chrisnorman7/gmp3>
,
a web-based jukebox which ships with its own server <https://github.com/chrisnorman7/jukebox>
,
command line <https://github.com/christopher-dg/pmcli>
clients <https://github.com/and3rson/clay>
,
a FUSE filesystem <https://github.com/EnigmaCurry/GMusicFS>
,
and an Alexa skill <https://github.com/stevenleeg/geemusic>
syncing tracks <https://github.com/thebigmunch/gmusicapi-scripts>
,
syncing playlists <https://github.com/soulfx/gmusic-playlist>
,
and migrating to a different account <https://github.com/brettcoburn/gmusic-migrate>
__gmusicproxy <https://github.com/gmusicproxy/gmusicproxy>
and
gmusicprocurator <https://github.com/malept/gmusicprocurator>
,
as well as plugins for
Mopidy <https://github.com/hechtus/mopidy-gmusic>
,
Squeezebox <https://github.com/squeezebox-googlemusic/squeezebox-googlemusic>
and
Tizonia <https://github.com/tizonia/tizonia-openmax-il>
__.autoplaylists / smart playlists <https://autoplaylists.simon.codes>
__Start with the usage docs <http://unofficial-google-music-api.readthedocs.io/en/latest/usage.html#usage>
__, which will guide you through installation and the available apis.
Once you're up and running, you can explore the rest of the docs at http://unofficial-google-music-api.readthedocs.io.
If the documentation doesn't answer your questions, or you just want to get
in touch, either drop by #gmusicapi on Freenode <http://webchat.freenode.net/?channels=gmusicapi>
__ or shoot me an email.
|build_status|
.. |build_status| image:: https://travis-ci.org/simon-weber/gmusicapi.png?branch=develop :target: https://travis-ci.org/simon-weber/gmusicapi
For fine-grained development updates, follow me on Twitter:
@simonmweber <https://twitter.com/simonmweber>
__.