Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/satoshi-sh/connect-spotify


https://github.com/satoshi-sh/connect-spotify

Last synced: 28 days ago
JSON representation

Awesome Lists containing this project

README

        

### How to use the Package

Run `pip install connect_spotify`

```
from connect_spotify import ConnectionAPI
conn = ApiConnection(
token=SPOTIFY_API_TOKEN
)
conn._connect()
conn.get_spotify_artist('the strokes')

#returns artist data
{'external_urls': {'spotify': 'https://open.spotify.com/artist/0epOFNiUfyON9EYx7Tpr6V'}, 'followers': {'href': None, 'total': 5352130}, 'genres': ['alternative rock', 'garage rock', 'modern rock', 'permanent wave', 'rock'], 'href': 'https://api.spotify.com/v1/artists/0epOFNiUfyON9EYx7Tpr6V', 'id': '0epOFNiUfyON9EYx7Tpr6V', 'images': [{'height': 640, 'url': 'https://i.scdn.co/image/ab6761610000e5ebcaea403b29f6a09260b6a18a', 'width': 640}, {'height': 320, 'url': 'https://i.scdn.co/image/ab67616100005174caea403b29f6a09260b6a18a', 'width': 320}, {'height': 160, 'url': 'https://i.scdn.co/image/ab6761610000f178caea403b29f6a09260b6a18a', 'width': 160}], 'name': 'The Strokes', 'popularity': 74, 'type': 'artist', 'uri': 'spotify:artist:0epOFNiUfyON9EYx7Tpr6V'}
```

### Description

[Original Repo](https://github.com/Satoshi-Sh/streamlit-api)
This application was created to join Streamlit Hackathon. It data visualizes music artist popularities by bar and line plots. Streamlit connection was used to interact with Spotify API.

### How to Run

- Run `pip intall`
- Create secrets.toml according to the sample.secrets.toml. You need to get your client secret from Spotify
- Run `streamlit run app.py`

### Live page

[Live Page](https://spotify-dataviz.streamlit.app/)

Streamlit kindly provides the community cloud server for streamlit app.
Follow the instructions of the [link](https://docs.streamlit.io/streamlit-community-cloud/deploy-your-app) if you want to deploy it on your own.


musicians popularity plots.