Skip to main content

Spotify news

Project description

spotifynews

Python library for creating news and collections

workflow name

Description

Spotifynews is a wrapper on spotipy that provides new more complex functionalities: news and collections. It also extends spotipy with additional functions that aim to simplify spotipy usage.

Installation

pip install spotifynews

or upgrade

pip install spotifynews --upgrade

Quick Start

More information about spotifynews can be found in the spotifynews documentation.

More information about spotipy can be found in the spotipy documentation.

To get started, install spotifynews and create an app on https://developers.spotify.com/. Add your new SPOTIPY_CLIENT_ID and SPOTIPY_CLIENT_SECRET to your environment. After script run for the first time authorize on spotify webpage by logging and allowing scope playlist-modify-public.

News

This functionality accumulates song from source playlist in local database and based on that it is able to notice truly new tracks, because new trucks are not yet in database. If this situation occurs, it creates clone of original playlist with only new tracks.

To utilize this functionality run script once a week and enjoy new hits from your favorite playlist :coffee:

from spotifynews.update import news
todays_top_hits_id = 'spotify:playlist:37i9dQZF1DXcBWIGoYBM5M'
news(database_f="test.db", original_playlist_id=todays_top_hits_id)

Collections

This functionality creates playlist from all songs stored from source playlist in local database (songs which were stored after 'news' function call). If you follow a playlist with 50 songs, which rotates 3 new songs per week, after a year your clone playlist collection will have 86 tracks.

from spotifynews.update import collections
todays_top_hits_id = 'spotify:playlist:37i9dQZF1DXcBWIGoYBM5M'
collections(database_f="test.db", original_playlist_id=todays_top_hits_id)

Project details


Download files

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

Source Distribution

spotifynews-0.1.3.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

spotifynews-0.1.3-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file spotifynews-0.1.3.tar.gz.

File metadata

  • Download URL: spotifynews-0.1.3.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.3

File hashes

Hashes for spotifynews-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a3a9e9f73511625782e98fee05738c78a80649258c43a09d98017673d4404d1d
MD5 a0466dbea87ffd74898fd38c65896ab2
BLAKE2b-256 bb8b41a711d2191dfda3786597e7a669938b2b30d05c26528faf47641e8de7b2

See more details on using hashes here.

File details

Details for the file spotifynews-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: spotifynews-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.3

File hashes

Hashes for spotifynews-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 488caf99fb240c360351c5132570ab6bfdca2d888dff4310610437ce1e11c488
MD5 6d7454500f6937dd38947fa28a71d82b
BLAKE2b-256 6f49b8081b7ac978d25847734bb212e1ee850e4a300161431c2acd6d61dbcea9

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