All Projects → davidski → spotify-lambda

davidski / spotify-lambda

Licence: MIT License
λ🎵AWS Lambda functions for Spotify tracking

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to spotify-lambda

Obscurify
Find out more about your music taste and compare it to others' with Obscurify
Stars: ✭ 200 (+1566.67%)
Mutual labels:  spotify, lambda
spotify-lifx-visualiser
Visualising Spotify music with LIFX bulbs
Stars: ✭ 28 (+133.33%)
Mutual labels:  spotify
aws-serverless-fullstack-swift-apple-carplay-example
This application demonstrates a full-stack Apple CarPlay app that uses Swift for both the UI and the backend services in AWS. The app accesses Lambda functions written in Swift and deployed from Docker images. The app accesses Amazon Location Service and a 3rd party weather api to display information in the vicinity of the user.
Stars: ✭ 84 (+600%)
Mutual labels:  lambda
discord-lavalink-music-bot
This is music bot for discord made with erelajs, lavalink, discordjs v13-dev
Stars: ✭ 34 (+183.33%)
Mutual labels:  spotify
super-serverless-sample
Backend serverless que simula o sistema de votação do BBB
Stars: ✭ 30 (+150%)
Mutual labels:  lambda
0x4447 product answering machine
☎️ An automated answering machine build on top of Amazon Connect
Stars: ✭ 38 (+216.67%)
Mutual labels:  lambda
scelta
(experimental) Syntactic sugar for variant and optional types.
Stars: ✭ 140 (+1066.67%)
Mutual labels:  lambda
Spotify-Headless
Experimental wrapper for Spotify API to search songs and control the web player using the CLI. (Feat. Puppeteer)
Stars: ✭ 73 (+508.33%)
Mutual labels:  spotify
lambda-watermark
AWS Lambda Watermark service for S3 images
Stars: ✭ 20 (+66.67%)
Mutual labels:  lambda
serverless-ninja
Code repository of AWS Serverless Ninja Guidebook 👹 👹 👹
Stars: ✭ 40 (+233.33%)
Mutual labels:  lambda
pinboard-backup
This backs up Pinboard bookmarks to DynamoDB.
Stars: ✭ 17 (+41.67%)
Mutual labels:  lambda
spotify-card
Generate spotify embeds using canvas
Stars: ✭ 21 (+75%)
Mutual labels:  spotify
zappa-slack-inviter
A server-less Slack inviter
Stars: ✭ 32 (+166.67%)
Mutual labels:  lambda
linqjs
use linq and lambda in javascript on es6, can use linq function in an Object or an Array or a String value | 一个方便对数组、字典、树形数据进行操作、筛选等操作的工具库
Stars: ✭ 17 (+41.67%)
Mutual labels:  lambda
lambda-launcher
Application launcher in haskell. Mostly Just For Fun.
Stars: ✭ 67 (+458.33%)
Mutual labels:  lambda
CloudWatch2S3
Logging infrastructure for exporting all CloudWatch logs from multiple accounts to a single S3 bucket
Stars: ✭ 31 (+158.33%)
Mutual labels:  lambda
Songify
A simple tool that gets the current track from Spotify, YouTube and Nightbot.
Stars: ✭ 66 (+450%)
Mutual labels:  spotify
lambda-redirector
Redirect an entire website using AWS Lambda
Stars: ✭ 21 (+75%)
Mutual labels:  lambda
nuxt-on-lambda
Nuxt.jsをAWS Lambdaで動かす
Stars: ✭ 78 (+550%)
Mutual labels:  lambda
nowplaying-widget
A Spotify Now Playing widget that's accessible with anything that can render a webpage
Stars: ✭ 15 (+25%)
Mutual labels:  spotify

Spotify-History

NOTE

I no longer use Spotify due to their support for blatant, socially-harmfull, misinformation. This project is in hibernation mode as of February 2022 and is not likely to receive further updates.

Python based AWS Lambda function for building an offline list of played tracks from Spotify.

When triggered, this function polls the Spotify API for all tracks played on the current date. As the Spotify API returns no more than 50 tracks, this function is intended to be ran several times a day. It first looks for an existing day's history file in S3. Any found history file is merged with the results from the API, using the played_at key to deduplicate.

Expected Environment Variables

  • SPOTIFY_BUCKET_NAME - Name of S3 bucket to store data and token files.
  • SPOTIFY_BUCKET_KEY - Optional key under which to store data and token files. Must not have a leading slash.
  • SPOTIFY_CLIENT_ID - Application OAuth client ID.
  • SPOTIFY_CLIENT_NAME - Application OAuth client secret.

Deployment

The included Makefile will build a ZIP file which can be deployed to AWS Lambda. This ZIP file will include all dependencies.

The Spotify API uses OAuth authentication. The initial setup of tokens requires user interaction to authorize this application. To carry out first time setup, run the authorize.py script in an interactive window. This will prompt the user to visit a Spotify URL and authorize the application. Upon authorization, the user's browser will be redirected to a non-resolving URL. Copy that full URL and paste into the python console. The authorize.py script will take that response URL, obtain a OAuth token from Spotify, and save it in a token.json file in the S3 bucket configured in the environment variables. Future runs of the main.py process do not require authorization as long as the function can auto-renew the token. If this function is run at least every 12 hours, that should not be a problem (renew token lengths are approximately 15 hours).

Contributing

This project is governed by a Code of Conduct. By participating in this project you agree to abide by these terms.

License

The MIT License applies.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].