Skip to main content

Convert a Spotify export zip to a SQLite database

Project description

spotify-to-sqlite

PyPI Changelog License

Convert a Spotify export zip to a SQLite database

Installation

Install this library using pip:

$ pip install spotify-to-sqlite

Usage

Convert a Spotify export zip to a SQLite database

spotify-to-sqlite convert my_spotify_data.zip spotify.db

You can use Spotify's Web API to retrieve audio features tracks in your streaming_history and your_library_tracks tables. You will need a CLIENT_ID and a CLIENT_SECRET which you can get when you register an application the Spotify Developer's site. You can export those as SPOTIPY_CLIENT_ID and SPOTIPY_CLIENT_SECRET (notice it's SPOTIPY not SPOTIFY). You can also save those on a .env file on your working directory as such:

# .env example
SPOTIPY_CLIENT_ID=adfgahjklsdf73932bcdlavsd7892dgfasd
SPOTIPY_CLIENT_SECRET=dabjgsd77507davsd12344dhgvafsdl
# when your converting export
spotify-to-sqlite --audio-features my_spotify_data.zip spotify.db

# if you already had converted your export you can pass a "-"
spotify-to-sqlite --audio-features - spotify.db

Development

To contribute to this library, first checkout the code. Then create a new virtual environment:

cd spotify-to-sqlite
python -m venv venv
source venv/bin/activate

Or if you are using pipenv:

pipenv shell

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

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

spotify-to-sqlite-0.2.1.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

spotify_to_sqlite-0.2.1-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file spotify-to-sqlite-0.2.1.tar.gz.

File metadata

  • Download URL: spotify-to-sqlite-0.2.1.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for spotify-to-sqlite-0.2.1.tar.gz
Algorithm Hash digest
SHA256 9790d779710693fa7f0d4d753beb00f936ba3a9ed04453134fe09c6d90c0ba1a
MD5 8bc97730155e98af9fb92df43ecac198
BLAKE2b-256 7542e7d989dc4b2e1e0c474c6647fa7bf986dc0d288d59f4efff0ecefd657469

See more details on using hashes here.

File details

Details for the file spotify_to_sqlite-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for spotify_to_sqlite-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e74b0f5db0597b6ccce099c09c33cb16143cdab6ea3c8691cbac0ca25e94f7ad
MD5 54f92f72a5e25dee8d612c17de0c6d8f
BLAKE2b-256 bf81b61f4ccce133bea9b379974259e8f8d879c65a7ee51ac03a3799cd928382

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