How I Built a Dynamic Spotify β€˜Now Playing’ Banner for My GitHub README using Python and Flask 🐍



This content originally appeared on DEV Community and was authored by Shuvranshu Sekhar Sahoo

🎵 Project Showcase: Spotify-Live-Banner

Tired of static stats on your GitHub profile? I recently launched Spotify-Live-Banner, a small, open-source web service that fetches your currently playing Spotify track and renders it as a clean, real-time, animated SVG image banner. It’s a fun way to bring life to your profile, and I wanted to share the process of building it with Python and Flask.

Spotify Live Banner Preview

1. What It Does (Core Functionality)

The project serves a single purpose: to provide a highly customized image URL that displays your live music activity.

  • Data Source: Fetches the user’s currently playing track from the Spotify API.
  • Rendering: Uses Flask to serve a route that dynamically generates an SVG image based on the song data and user-defined themes (colors, animations, layout).
  • Target Audience: Developers looking for a dynamic profile widget who prefer using the Python ecosystem.

2. Why Python and Flask? (Comparison)

While there are existing solutions, I chose a Python/Flask implementation because:

  • Familiarity: It offers a robust, familiar, and minimalist backend for developers in the Python world.
  • Custom Logic: Flask is lightweight, making it efficient for running the SVG rendering and API caching logic required for real-time performance.
  • Deployment: The project is configured for easy, free, one-click deployment on serverless platforms like Vercel and Render, making setup simple for the end-user.

3. Key Features

  • Real-time Updates: Shows the song you’re listening to right now.
  • Customization: Supports various color themes, animations (e.g., spinning CD), and layouts.
  • Open Source: The entire code base is available under the GPL-3.0 License.

🚀 Get Started

If you’re looking for a quick and fun Python project to deploy or want to instantly upgrade your GitHub profile with a dynamic element, feel free to clone and use it!

Check out the live demo here:
➡ Live Demo (Vercel): https://spotify-live-banner.vercel.app

Star the repo and check out the source code:
⭐ GitHub Repository: https://github.com/SahooShuvranshu/Spotify-Live-Banner

I’d love to hear your thoughts on the code implementation or any feature suggestions! Drop a comment below.


This content originally appeared on DEV Community and was authored by Shuvranshu Sekhar Sahoo