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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35229e880de09c84de84b80ae96e7198488295e748facef2921591f0012858ea |
|
MD5 | fb27d57afcebdf30789bd1ac827bd1a4 |
|
BLAKE2b-256 | d17e3d9f71322a10080fddc9f2b21a897780465bf3f861728096670cc4f707e8 |
Hashes for spotify_to_sqlite-0.1.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cf26a7014f3b2f29d275028b2c84c077760e8a715b4d1e67fd4263a21faabea |
|
MD5 | 21b9d309f4010e24f57e0d09fb3af4e8 |
|
BLAKE2b-256 | 39c250324bb6e0d35e2d88afb2ffc232bc86e9417fd460e08d26d5e6c7f52bbf |