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

Uploaded Python 3

File details

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

File metadata

  • Download URL: spotifynews-0.1.4.tar.gz
  • Upload date:
  • Size: 7.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.4.tar.gz
Algorithm Hash digest
SHA256 6af4eae4398c1f95b0cd114a0800997c70ee8e81aa28a6b615d63b96c9146685
MD5 cda7d5ebbd79e80e44641ac315580cfe
BLAKE2b-256 a5f8da6bb2c5c6833d3e6150edfcc87f93b609401cf56963bf82778b6aab8c77

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spotifynews-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.8 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3873930927de8e7def1d64459d974923a2a58ec81681002509435618a2b8cd1a
MD5 a3ca375f6d89a9eb7c86f96c705d961c
BLAKE2b-256 204556375d972e6e909723723bb1854a73ee39f433840198487fbed80b725581

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