spotipy


Namespotipy JSON
Version 2.25.0 PyPI version JSON
download
home_pagehttps://spotipy.readthedocs.org/
SummaryA light weight Python library for the Spotify Web API
upload_time2025-01-03 12:34:03
maintainerNone
docs_urlNone
author@plamere
requires_python>3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Spotipy

##### Spotipy is a lightweight Python library for the [Spotify Web API](https://developer.spotify.com/documentation/web-api). With Spotipy you get full access to all of the music data provided by the Spotify platform.

![Integration tests](https://github.com/spotipy-dev/spotipy/actions/workflows/integration_tests.yml/badge.svg?branch=master) [![Documentation Status](https://readthedocs.org/projects/spotipy/badge/?version=master)](https://spotipy.readthedocs.io/en/latest/?badge=master) [![Discord server](https://img.shields.io/discord/1244611850700849183?style=flat&logo=discord&logoColor=7289DA&color=7289DA)](https://discord.gg/HP6xcPsTPJ)

## Table of Contents

- [Features](#features)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Reporting Issues](#reporting-issues)
- [Contributing](#contributing)

## Features

Spotipy supports all of the features of the Spotify Web API including access to all end points, and support for user authorization. For details on the capabilities you are encouraged to review the [Spotify Web API](https://developer.spotify.com/web-api/) documentation.

## Installation

```bash
pip install spotipy
```

alternatively, for Windows users 

```bash
py -m pip install spotipy
```

or upgrade

```bash
pip install spotipy --upgrade
```

## Quick Start

A full set of examples can be found in the [online documentation](http://spotipy.readthedocs.org/) and in the [Spotipy examples directory](https://github.com/plamere/spotipy/tree/master/examples).

To get started, [install spotipy](#installation), create a new account or log in on https://developers.spotify.com/. Go to the [dashboard](https://developer.spotify.com/dashboard), create an app and add your new ID and SECRET (ID and SECRET can be found on an app setting) to your environment ([step-by-step video](https://www.youtube.com/watch?v=kaBVN8uP358)):

### Example without user authentication

```python
import spotipy
from spotipy.oauth2 import SpotifyClientCredentials

sp = spotipy.Spotify(auth_manager=SpotifyClientCredentials(client_id="YOUR_APP_CLIENT_ID",
                                                           client_secret="YOUR_APP_CLIENT_SECRET"))

results = sp.search(q='weezer', limit=20)
for idx, track in enumerate(results['tracks']['items']):
    print(idx, track['name'])
```
Expected result:
```
0 Island In The Sun
1 Say It Ain't So
2 Buddy Holly
.
.
.
18 Troublemaker
19 Feels Like Summer
```


### Example with user authentication

A redirect URI must be added to your application at [My Dashboard](https://developer.spotify.com/dashboard/applications) to access user authenticated features.

```python
import spotipy
from spotipy.oauth2 import SpotifyOAuth

sp = spotipy.Spotify(auth_manager=SpotifyOAuth(client_id="YOUR_APP_CLIENT_ID",
                                               client_secret="YOUR_APP_CLIENT_SECRET",
                                               redirect_uri="YOUR_APP_REDIRECT_URI",
                                               scope="user-library-read"))

results = sp.current_user_saved_tracks()
for idx, item in enumerate(results['items']):
    track = item['track']
    print(idx, track['artists'][0]['name'], " – ", track['name'])
```
Expected result will be the list of music that you liked. For example if you liked Red and Sunflower, the result will be:
```
0 Post Malone  –  Sunflower - Spider-Man: Into the Spider-Verse
1 Taylor Swift  –  Red
```


## Reporting Issues

For common questions please check our [FAQ](FAQ.md).

You can ask questions about Spotipy on
[Stack Overflow](http://stackoverflow.com/questions/ask).
Don’t forget to add the *Spotipy* tag, and any other relevant tags as well, before posting.

If you have suggestions, bugs or other issues specific to this library,
file them [here](https://github.com/plamere/spotipy/issues).
Or just send a pull request.

## Contributing

If you are a developer with Python experience, and you would like to contribute to Spotipy, please be sure to follow the guidelines listed on documentation page

> #### [Visit the guideline](https://spotipy.readthedocs.io/en/#contribute)

            

Raw data

            {
    "_id": null,
    "home_page": "https://spotipy.readthedocs.org/",
    "name": "spotipy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "@plamere",
    "author_email": "paul@echonest.com",
    "download_url": "https://files.pythonhosted.org/packages/d7/ac/bdd2036b97be3f5e7c3233772992d74baa1874b4dbf27e7a1976a25642fc/spotipy-2.25.0.tar.gz",
    "platform": null,
    "description": "# Spotipy\n\n##### Spotipy is a lightweight Python library for the [Spotify Web API](https://developer.spotify.com/documentation/web-api). With Spotipy you get full access to all of the music data provided by the Spotify platform.\n\n![Integration tests](https://github.com/spotipy-dev/spotipy/actions/workflows/integration_tests.yml/badge.svg?branch=master) [![Documentation Status](https://readthedocs.org/projects/spotipy/badge/?version=master)](https://spotipy.readthedocs.io/en/latest/?badge=master) [![Discord server](https://img.shields.io/discord/1244611850700849183?style=flat&logo=discord&logoColor=7289DA&color=7289DA)](https://discord.gg/HP6xcPsTPJ)\n\n## Table of Contents\n\n- [Features](#features)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [Reporting Issues](#reporting-issues)\n- [Contributing](#contributing)\n\n## Features\n\nSpotipy supports all of the features of the Spotify Web API including access to all end points, and support for user authorization. For details on the capabilities you are encouraged to review the [Spotify Web API](https://developer.spotify.com/web-api/) documentation.\n\n## Installation\n\n```bash\npip install spotipy\n```\n\nalternatively, for Windows users \n\n```bash\npy -m pip install spotipy\n```\n\nor upgrade\n\n```bash\npip install spotipy --upgrade\n```\n\n## Quick Start\n\nA full set of examples can be found in the [online documentation](http://spotipy.readthedocs.org/) and in the [Spotipy examples directory](https://github.com/plamere/spotipy/tree/master/examples).\n\nTo get started, [install spotipy](#installation), create a new account or log in on https://developers.spotify.com/. Go to the [dashboard](https://developer.spotify.com/dashboard), create an app and add your new ID and SECRET (ID and SECRET can be found on an app setting) to your environment ([step-by-step video](https://www.youtube.com/watch?v=kaBVN8uP358)):\n\n### Example without user authentication\n\n```python\nimport spotipy\nfrom spotipy.oauth2 import SpotifyClientCredentials\n\nsp = spotipy.Spotify(auth_manager=SpotifyClientCredentials(client_id=\"YOUR_APP_CLIENT_ID\",\n                                                           client_secret=\"YOUR_APP_CLIENT_SECRET\"))\n\nresults = sp.search(q='weezer', limit=20)\nfor idx, track in enumerate(results['tracks']['items']):\n    print(idx, track['name'])\n```\nExpected result:\n```\n0 Island In The Sun\n1 Say It Ain't So\n2 Buddy Holly\n.\n.\n.\n18 Troublemaker\n19 Feels Like Summer\n```\n\n\n### Example with user authentication\n\nA redirect URI must be added to your application at [My Dashboard](https://developer.spotify.com/dashboard/applications) to access user authenticated features.\n\n```python\nimport spotipy\nfrom spotipy.oauth2 import SpotifyOAuth\n\nsp = spotipy.Spotify(auth_manager=SpotifyOAuth(client_id=\"YOUR_APP_CLIENT_ID\",\n                                               client_secret=\"YOUR_APP_CLIENT_SECRET\",\n                                               redirect_uri=\"YOUR_APP_REDIRECT_URI\",\n                                               scope=\"user-library-read\"))\n\nresults = sp.current_user_saved_tracks()\nfor idx, item in enumerate(results['items']):\n    track = item['track']\n    print(idx, track['artists'][0]['name'], \" \u2013 \", track['name'])\n```\nExpected result will be the list of music that you liked. For example if you liked Red and Sunflower, the result will be:\n```\n0 Post Malone  \u2013  Sunflower - Spider-Man: Into the Spider-Verse\n1 Taylor Swift  \u2013  Red\n```\n\n\n## Reporting Issues\n\nFor common questions please check our [FAQ](FAQ.md).\n\nYou can ask questions about Spotipy on\n[Stack Overflow](http://stackoverflow.com/questions/ask).\nDon\u2019t forget to add the *Spotipy* tag, and any other relevant tags as well, before posting.\n\nIf you have suggestions, bugs or other issues specific to this library,\nfile them [here](https://github.com/plamere/spotipy/issues).\nOr just send a pull request.\n\n## Contributing\n\nIf you are a developer with Python experience, and you would like to contribute to Spotipy, please be sure to follow the guidelines listed on documentation page\n\n> #### [Visit the guideline](https://spotipy.readthedocs.io/en/#contribute)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A light weight Python library for the Spotify Web API",
    "version": "2.25.0",
    "project_urls": {
        "Homepage": "https://spotipy.readthedocs.org/",
        "Source": "https://github.com/plamere/spotipy"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c99c229d432e223e614f7dbe5de626d3713094f03af79a6f5dbc1bbdf7d95ae8",
                "md5": "493ef324271c99d15733e625ebea7d43",
                "sha256": "92ef16577adab22aeac7d699b9aa6abb8e38d3023d865c0a233cdcfa0dca9583"
            },
            "downloads": -1,
            "filename": "spotipy-2.25.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "493ef324271c99d15733e625ebea7d43",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">3.8",
            "size": 30904,
            "upload_time": "2025-01-03T12:33:59",
            "upload_time_iso_8601": "2025-01-03T12:33:59.362973Z",
            "url": "https://files.pythonhosted.org/packages/c9/9c/229d432e223e614f7dbe5de626d3713094f03af79a6f5dbc1bbdf7d95ae8/spotipy-2.25.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d7acbdd2036b97be3f5e7c3233772992d74baa1874b4dbf27e7a1976a25642fc",
                "md5": "0e7ae4b79e31eef96c0a2e4b9c727a92",
                "sha256": "c72720ef85355aff959f7fe8d89ded48504d8c33b92583db90ec16daac0da54f"
            },
            "downloads": -1,
            "filename": "spotipy-2.25.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0e7ae4b79e31eef96c0a2e4b9c727a92",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">3.8",
            "size": 43389,
            "upload_time": "2025-01-03T12:34:03",
            "upload_time_iso_8601": "2025-01-03T12:34:03.114449Z",
            "url": "https://files.pythonhosted.org/packages/d7/ac/bdd2036b97be3f5e7c3233772992d74baa1874b4dbf27e7a1976a25642fc/spotipy-2.25.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-03 12:34:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "plamere",
    "github_project": "spotipy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "spotipy"
}
        
Elapsed time: 0.38762s