{"id":15556000,"url":"https://github.com/ananya2001-an/spotify-py-sdk","last_synced_at":"2025-06-14T18:36:09.689Z","repository":{"id":214692786,"uuid":"736404404","full_name":"Ananya2001-an/spotify-py-sdk","owner":"Ananya2001-an","description":"Python SDK for Spotify Web API","archived":false,"fork":false,"pushed_at":"2024-09-15T08:20:46.000Z","size":3416,"stargazers_count":7,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-18T04:55:41.298Z","etag":null,"topics":["api","learn","library","poetry","python","sdk","sphinx-doc","spotify-api"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/spotify-py-sdk","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/Ananya2001-an.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-12-27T20:12:31.000Z","updated_at":"2024-09-15T08:20:50.000Z","dependencies_parsed_at":"2025-04-17T16:00:59.816Z","dependency_job_id":"681a2444-4018-4d2a-ae83-ca2e4fb2efdd","html_url":"https://github.com/Ananya2001-an/spotify-py-sdk","commit_stats":null,"previous_names":["ananya2001-an/spotify-py-sdk"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ananya2001-an%2Fspotify-py-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ananya2001-an%2Fspotify-py-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ananya2001-an%2Fspotify-py-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ananya2001-an%2Fspotify-py-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ananya2001-an","download_url":"https://codeload.github.com/Ananya2001-an/spotify-py-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250507184,"owners_count":21441935,"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":["api","learn","library","poetry","python","sdk","sphinx-doc","spotify-api"],"created_at":"2024-10-02T15:11:27.188Z","updated_at":"2025-04-23T20:24:16.076Z","avatar_url":"https://github.com/Ananya2001-an.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Python SDK for Spotify Web API\n[![Downloads](https://static.pepy.tech/badge/spotify-py-sdk)](https://pepy.tech/project/spotify-py-sdk)\n\n\u003e This library is still a work in progress.\n\nThis is a Python library for the [Spotify Web API](https://developer.spotify.com/web-api/). This SDK is very simple to use if you are already familiar with the [typescript SDK](https://github.com/spotify/spotify-web-api-ts-sdk) provided by Spotify. It takes a lot of help from there. \n\n### Endpoints currently available\n- albums\n- artists\n- audiobooks\n- browse\n- chapters\n- episodes\n- markets\n- playlists\n- recommendations\n- search\n- shows\n- tracks\n- users\n\n### Requirements\n\n- python 3.9 or higher\n\n### Using this in your project\n\nYou can install this package using pip:\n\n```commandline\npip install spotify-py-sdk\n```\n\nor using poetry:\n\n```commandline\npoetry add spotify-py-sdk\n```\n\n\n### Running the example provided\n\nFirst install the dependencies (make sure you have **poetry** installed):\n\n```commandline\npoetry install\n```\n\nCreate a .env file in the root directory with your client_id and client_secret. Refer the `.env.example` file for reference.\n\n```text\nCLIENT_ID=\nCLIENT_SECRET=\n```\n\nNow run the file to get results back from the web api:\n```commandline\npython example.py\n```\n\n### Create a client instance\n\nCurrently, we only have client credentials flow for authentication. If you're building a server side application, you should use Client Credentials Flow, and is the correct choice when you have both your Client ID and Client Secret available.\n\n```python\nfrom spotify-py-sdk import SpotifyApi, SdkConfig\nfrom dotenv import load_dotenv\nload_dotenv()\n\nconfig = SdkConfig() # optional; can create custom methods\napi: SpotifyApi = SpotifyApi(os.getenv(\"CLIENT_ID\"), os.getenv(\"CLIENT_SECRET\"), config)\n```\n\nOnce you have an authenticated instance of the SDK, you can make requests to the Spotify Web API by using the methods exposed on the client instance of the API.\n\n```python\napi.search.execute(\"purpose\", [\"album\"])\napi.browse.get_categories()\n```\n\n### Running the tests\n\nTo run the tests, you need to have a Spotify account.\n\nYou will need to create a new app in the Spotify Developer portal, and add a redirect URI of http://localhost:3000.\n\nYou will need to add the following environment variables:\n- `CLIENT_ID`\n- `CLIENT_SECRET`\n\nYou can run the tests using `pytest`. We support `python-dotenv`, so you can add these to a `.env` file in the root of the repository.\n\nTo run all tests:\n```python\npytest\n```\nTo run a specific test.\n```python\npytest tests/endpoints/test_albums.py\n```\n\n        \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fananya2001-an%2Fspotify-py-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fananya2001-an%2Fspotify-py-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fananya2001-an%2Fspotify-py-sdk/lists"}