Skip to main content

Spotify-Api.py

Simple wrapper for Spotify api written in python by the @spotify-api Organization!

Support

So, hey facing troubles? We have some ways you to support you!

Quick Docs

Client Class

Client class will be the main class to access other classes!

from spotifyapi import Client

client = Client(
  token='your-token'
)

Now as the Spotify Token Regenerates for every 5 minutes you can get a new token by Client ID and Client Secret!

# You can use set interval if u want

from spotifyapi import Client

client = Client(
  token='NO TOKEN' # Leave it like this
)

my_auth = client.oauth.get(
  client_id='your-id',
  client_secret='your-secret'
)

print(my_auth['access_token']) # Will print token. If you find errors, you can create an issue in Github repo

Track Class

Track class will let you to find, get and configure your search with tracks. You have to load client. Example given above

First define tracks if needed

track = client.track

# or

from spotifyapi.Track import Track
track = Track('some-token')

Functions

Name Params Example
search query: str, limit: int track.search('some query', 5)
get trackID: str, advanced: bool track.get('some-id')
audio_features trackID: str track.audio_features('some-id')
audio_analysis trackID: str track.audio_analysis('some-id')

Artist Class

Artist class will let you to find, get and configure your search with artists. You have to load client. Example given above

First define artist if needed

artist = client.artist

# or

from spotifyapi.Artist import Artist
artist = Artist('some-token')

Functions

Name Params Example
search query: str, limit: int artist.search('some query', 5)
get artistID: str artist.get('some-id')
albums artistID: str, limit: int artist.albums('some-id',5)
top_tracks artistID: str artist.top_tracks('some-id')
related_artists artistID: str artist.related_artists('some id')

Album Class

Album class will let you to find, get and configure your search with albums. You have to load client. Example given above

First define album if needed

artist = client.album

# or

from spotifyapi.Album import Album
artist = Album('some-token')

Functions

Name Params Example
search query: str, limit: int album.search('some query', 5)
get albumID: str album.get('some-id', 5)
get_tracks albumID: str, limit: int album.get_tracks('some-id', 5)

User Class

Album class will let you to find, get and configure your search with users. You have to load client. Example given above

First define user if needed

user = client.user

# or

from spotifyapi.User import User
user = User('some-token')

Functions

Name Params Example
get userID: str user.get('some-id')

Playlist Class

Playlist class will let you get info and get the tracks inside a playlist. You have to load client. Example given above

First define playlist if needed

playlist = client.playlist

# or

from spotifyapi.Playlist import Playlist
playlist = Playlist('some-token')

Functions

Name Params Example
get playlistID: str playlist.get('some-id')
tracks playlistID: str, limit: int playlist.tracks('some-id',5)

Metadata

Release files for spotify-api.py 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spotify-api.py 0.0.3
File Size Uploaded Provenance Actions
spotify-api.py-0.0.3.tar.gz 4.1 kB Without provenance Details for spotify-api.py-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for spotify-api.py 0.0.3
File Interpreter ABI Platform Actions
spotify_api.py-0.0.3-py3-none-any.whl Python 3 none any Details for spotify_api.py-0.0.3-py3-none-any.whl

Total release size: 11.8 kB

Release files / spotify-api.py-0.0.3.tar.gz

Download URL spotify-api.py-0.0.3.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b35c3246e0adc6f826e841313950c8b992ac01610c25fb8cf819ba236fe7824d
BLAKE2b-256 checksum
How to use checksums
10ea07dce46b7a5017440335653bd493cfb55e1a6d5c0422c6cfdae3f68472e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.5.0

Release files / spotify_api.py-0.0.3-py3-none-any.whl

Download URL spotify_api.py-0.0.3-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9285a2c67a517ddacee15bfa40766e77d2390bf9cfcf24aff57ba62b6ec92b5
BLAKE2b-256 checksum
How to use checksums
d430b00bec177c79c5261a80994562ca558c8e02c7d5575d7827c4691a81452d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.5.0

Security for spotify-api.py 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page