Skip to main content

A small library to search Spotify music.

Project description

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"
))

Project details


Release history Release notifications | RSS feed

This version

1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anpu-1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anpu-1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file anpu-1.tar.gz.

File metadata

  • Download URL: anpu-1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for anpu-1.tar.gz
Algorithm Hash digest
SHA256 0c262347de59f65be9edeab149513928582ac53b420e2495f9662d250591aca5
MD5 a3eb51d69fec25f74823875eacfb218c
BLAKE2b-256 400dae83854ea350fbfd3480e4785e85b8ba0b07829b7dc3a4f8e7404cfb692a

See more details on using hashes here.

File details

Details for the file anpu-1-py3-none-any.whl.

File metadata

  • Download URL: anpu-1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for anpu-1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae31dc07c770da0b62ed7897f095e182beb61eae8e12afe74f4be391d76791a9
MD5 18470248938395a54d4603c6192e6dd1
BLAKE2b-256 f84fc462609196fec8655374ef9e76711ee9ee6709441aec9062425f2cb6ae01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page