How amanchoudhary1727/spotify-random-tracks-player works
Project type and purpose
• This is a small full-stack web application built with Flask (a Python microframework).
• It accepts artist names from a user, fetches random tracks via the Spotify Web API (using the Spotipy library), and triggers playback through Spotify’s playback endpoints.
File structure
• Top-level:
• LICENSE, README.md, requirements.txt – project metadata and dependencies.
• Spotify_Web/ – contains all application code.
• Spotify_Web/app.py – the single Flask application module.
• Spotify_Web/static/css/styles.css – custom styling for the UI.
• Spotify_Web/templates/index.html – the Jinja2 template that renders the user form and embeds the Spotify player.
README for additional insights
• Tech stack: Python 3.x, Flask, Spotipy, HTML/CSS.
• Deploy/run instructions: local virtualenv, environment variables for CLIENT_ID/CLIENT_SECRET, Flask server on port 5000, OAuth redirect on port 8888.
• Key flows: user enters artists → OAuth dance for API access → retrieve random tracks → call Spotify playback API.