{"id":16544469,"url":"https://github.com/steinitzu/spotify-api","last_synced_at":"2025-07-12T06:37:14.896Z","repository":{"id":52706238,"uuid":"96365947","full_name":"steinitzu/spotify-api","owner":"steinitzu","description":"Spotify web API client for Python","archived":false,"fork":false,"pushed_at":"2022-12-07T23:42:04.000Z","size":30,"stargazers_count":8,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-01T04:37:02.500Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steinitzu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-05T22:23:28.000Z","updated_at":"2023-12-05T21:41:33.000Z","dependencies_parsed_at":"2023-01-24T02:01:20.919Z","dependency_job_id":null,"html_url":"https://github.com/steinitzu/spotify-api","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/steinitzu/spotify-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinitzu%2Fspotify-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinitzu%2Fspotify-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinitzu%2Fspotify-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinitzu%2Fspotify-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steinitzu","download_url":"https://codeload.github.com/steinitzu/spotify-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steinitzu%2Fspotify-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264951612,"owners_count":23687974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T19:02:51.842Z","updated_at":"2025-07-12T06:37:14.877Z","avatar_url":"https://github.com/steinitzu.png","language":"Python","readme":"# spotify-api\nPython API client for the spotify web API.  \n[https://developer.spotify.com/web-api/](https://developer.spotify.com/web-api/)\n\n# Usage\n\n## Intro\n\n```python\nfrom spotify import Client, OAuth\n\nauth = OAuth('MY_CLIENT_ID', 'MY_CLIENT_SECRET')\nauth.request_client_credentials()\n\nclient = Client(auth)\n\nalbums = client.api.search('artist:frank zappa', type='artist', 'album')\n```\n\n## Flask example with OAuth\n\n```python\nfrom flask import Flask, redirect, request, session, url_for, jsonify\nfrom spotify import OAuth, Client\n\n\napp = Flask(__name__)\napp.config['SECRET_KEY'] = 'supersecret'\n\ndef get_auth(token=None):\n    auth = OAuth(\n        'MY_CLIENT_ID', \n        'MY_CLIENT_SECRET', \n        redirect_uri='http://my_redirect_uri',\n        scopes=['user-read-private', 'user-top-read']\n    )\n    auth.token = token\n    return auth\n    \n    \n    \n@app.route('/the_app')\ndef the_app():\n    token = session.get('spotify_token')\n    if not token:\n        return redirect(url_for('authorize'))\n    client = Client(get_auth(token))\n    \n    return jsonify([\n        client.api.me(),\n        client.api.me_top('artists')\n    ])\n    \n    \n@app.route('/authorize')\ndef authorize():\n    auth = get_auth()\n    return redirect(auth.authorize_url)\n    \n    \n@app.route('/callback')  # redirect uri should point to this\ndef callback():\n    auth = get_auth()\n    auth.request_token(request.url)\n    session['spotify_token'] = auth.token\n    return redirect(url_for('the_app'))\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteinitzu%2Fspotify-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteinitzu%2Fspotify-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteinitzu%2Fspotify-api/lists"}