Skip to main content

Spotify news

Project description

spotifynews

Python library for creating news and collections

workflow name

Installation

pip install spotifynews

or upgrade

pip install spotifynews --upgrade

Quick Start

Spotifynews is a wrapper on spotipy.

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.1.tar.gz (5.1 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.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: spotifynews-0.1.1.tar.gz
  • Upload date:
  • Size: 5.1 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.1.tar.gz
Algorithm Hash digest
SHA256 66d71b71a8fd65b12a4a6492f8f442a0573aff4d4a993a0e214bacf5b4d49b02
MD5 5ad1f2473dd106eba57ae677163c1bb8
BLAKE2b-256 e5eb210d16ef93048fb94c8d9dcd339808932123e2ab966b26b58fcb6cb5e44e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spotifynews-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4b2046196c0b764b2c93cd5928f08c0a6c77b9f2ce4e8c012d10dd35dd5e3626
MD5 440d1de60d71691a84fbd3a42390c614
BLAKE2b-256 409d3248eefd1e9a2bb2476f5591914240600868ea78e5ca9335bb9850873d1c

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