Convert a Spotify export zip to a SQLite database
Project description
spotify-to-sqlite
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 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
Built Distribution
Hashes for spotify-to-sqlite-0.1.3.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7e2e47a299c8e997a1d021a8303f3f2b38b7e68ad47b534b884dc684510a502 |
|
MD5 | e5bb433ea4d8db93a43479472b6fb10f |
|
BLAKE2b-256 | f3c0e5b4bfc3cabc6397931dd1ee1941255c5287a512a1ff1e4a169f3abecb5d |
Hashes for spotify_to_sqlite-0.1.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e81c69e6f6896b007aec6896ecde8699b00f681ac9b19638aa8b848a781e8d8a |
|
MD5 | 8e839ed199b9a5be380b367263dcb0cd |
|
BLAKE2b-256 | 7b72b803b630d11f7b24373330a6bb9d2ce282d38fea90387317e435623309b9 |