Skip to main content

A package to get all album and track info for an artist by querying the Spotify API

Project description

access_spotify

This project is for all the music obsessives out there.

It will eventually evolve into a package that offers advanced functionality for utilizing the Spotify API.

Currently, the CLI interface queries Spotify for the specified artist (default = 'The Beatles' because who else?) and downloads all the album art, and all the album audio features and analysis for the artist.

You can also import individual album data directly into a data-frame via a script or notebook.

The album audio features and analysis are pickled as separate data-frames, which can then be read into pandas and analyzed, visualized etc.

It is recommended that the user work in their own virtual environment.

Get your own Client_ID and Client_Secret from https://developer.spotify.com/dashboard/applications

For detailed information on the API and what audio features and audio analysis you can get via this script, please refer to https://developer.spotify.com/documentation/web-api/reference/tracks/

Installation and Usage

Install the access-spotify package

  • pip install access-spotify

See the help menu

  • access_script.py --help

Query the Spotify API via CLI

  • access_script.py --artist_name 'Led Zeppelin' --client_id 'your-client-id' --client_secret 'your-client-secret'

This saves all the album art (high resolution) and album track information (audio features and audio analysis) into pickled data-frames in the data/ folder.

Getting data for individual albums from the Spotify API

  • See the example notebook on Github

Also

  • This is still very new, and I will continue to update the Documentation, functionality and add unit tests. Please let me know if you find any bugs or if you have any specific ideas for extending the functionality.

To-Do

  • Documentation
  • Unit tests
  • Improve the argparse functionality
  • Cool visualizations perhaps?
  • Predictive Modeling? How sad will the next Radiohead album be?

This project would not have been possible without Spotipy --> https://spotipy.readthedocs.io/en/2.13.0/

-- Go buy them a coffee and give their github repo a star!

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

access-spotify-1.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

access_spotify-1.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file access-spotify-1.1.tar.gz.

File metadata

  • Download URL: access-spotify-1.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.6

File hashes

Hashes for access-spotify-1.1.tar.gz
Algorithm Hash digest
SHA256 3a20408f87ffc02b5d6a73c69491b85baf6032b09d563d948b2e632585a92a6f
MD5 bd18d469aee775299816aec045c2fb02
BLAKE2b-256 5cfe8abca3b2e07d9d84e2168d2ac7291d8c1e0b3794e975f1a9d783e6b6a1bf

See more details on using hashes here.

File details

Details for the file access_spotify-1.1-py3-none-any.whl.

File metadata

  • Download URL: access_spotify-1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.6

File hashes

Hashes for access_spotify-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 157f25dcc7fa03ea41d67c44cbc62ef77a8baa5642ee53315c6800eb1da1bc57
MD5 1d29e29c8a6a86891fd5a178cb420939
BLAKE2b-256 3cddb92eefda0d9dadc3b2a14d4675a86ee9f775f5b0cf41540fcd728b1afc19

See more details on using hashes here.

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