You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

anpu

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anpu

A small library to search Spotify music.

1
pipPyPI
Maintainers
1

Anpu (暗譜) - memorize or play a song from memory.

A small library to search Spotify music.

python -m pip install anpu

Features

  • Cleans up Spotify Links into API calls (tracks, albums and playlists only).
  • Query search.

Both of these are handled by a single function.

Requirements

  • requests

Config

Anpu requires the use of a config file to store the Access Token. The config file can also be used to store your App's credentials.
It is automatically created in these directories respectively:

  • GNU/Linux: HOME/.config/anpu/config.json
  • macOS: HOME/Library/Preferences/anpu/config.json
  • Windows: %APPDATA%/anpu/config.json

Example

import anpu

client = anpu.client()
# alternatively
client = anpu.client(
    id = "app_id",
    secret = "app_secret"
)

# search query
print(client.send_request(
    {
        "q": "very intresting query",
        "type": "track",
        "limit": 5
    }
))

# get by link
print(client.send_request(
    "https://open.spotify.com/track/veryrealtrackid"
))

Keywords

spotify

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts