Author of pyspotify here :-)
dano is right: It seems like you're reading the v2.x docs and using v1.x. v2.x is a full rewrite with different and hopefully a lot simpler APIs to work with, so it's imperative that you use the docs that matches the version you code against:
- latest v2.x release: http://pyspotify.mopidy.com/en/latest/
- v2.0.0b1 docs: http://pyspotify.mopidy.com/en/v2.0.0b1/
- v1.11 docs: http://pyspotify.mopidy.com/en/v1.11/
At this point, I'd recommend using v2.x for all new applications. The v2.x API is easier to work with, works on more Python versions, covers the full libspotify API, and is actively maintained. The first beta, v2.0.0b1, was released yesterday. The final v2.0.0 release is hopefully just a few weeks away.
If you want to run pyspotify v2.x on Arch right away, you can install libspotify using yaourt:
sudo yaourt -S libspotify
Install the pyspotify build dependencies using pacman:
sudo pacman -S base-devel
And then install the latest pyspotify beta release using pip (either in a virtualenv or using sudo):
pip install --pre pyspotify
The --pre
flag is required until pyspotify 2.0.0 final is released.
For more details, see http://pyspotify.mopidy.com/en/latest/installation/.
pyspotify v2.x will probably appear in AUR shortly after final release.