DEV Community

Daniel
Daniel

Posted on • Originally published at github.com

Show DEV: Spotify Toolkit – A Python & CustomTkinter app to manage playlists and clean duplicates

Hey DEV community!

If you use Spotify as much as I do, you've probably faced the pain of bloated playlists, duplicate tracks hiding in long lists, or wanting to manage your local library data without clicking through endless menus.

To solve this, I built Spotify Toolkit — an open-source desktop application written in Python and CustomTkinter.


What does it do?

Spotify Toolkit provides a clean, modern GUI to manage your Spotify library efficiently:

  • Smart Duplicate Finder: Detects and cleans duplicated tracks across your playlists.
  • Library & Metadata Exporter: Export your playlist data and metadata for offline backup.
  • Fast Search & Filter: Quickly find tracks, albums, or artists across your collection.
  • Modern Dark UI: Built with CustomTkinter for a sleek native desktop experience.

The Tech Stack

  • Language: Python 3.x
  • GUI Framework: CustomTkinter
  • Spotify Web API Wrapper: Spotipy
  • Package / Environment Management: pip / uv

Technical Challenges & What I Learned

Building a desktop client over the Spotify Web API brought a few interesting challenges:

  1. Handling API Rate Limits: Managing batch requests when scanning large playlists (1,000+ tracks) without getting throttled.
  2. Responsive UI: Keeping the CustomTkinter GUI smooth and responsive during long API calls or duplicate scanning tasks.

Looking for Contributors!

The project is fully Open Source, and I'd love to get feedback, feature requests, or PRs from the community!

Whether you want to fix a bug, improve the UI/UX, or add a new feature, all contributions are welcome.

Good First Issues / Ideas to work on:

  • [ ] Add CSV / JSON export formats for library backups
  • [ ] Implement playlist sorting by BPM or audio features
  • [ ] Add unit tests for API helper functions
  • [ ] Improve dark/light theme switching

Check out the Repository on GitHub: DarksAces/Spotify-Toolkit


If you find it useful, feel free to drop a ⭐ on GitHub or leave your feedback/ideas in the comments below!

Happy coding!

Top comments (6)

Collapse
 
topstar_ai profile image
Luis Cruz

I was particularly interested in the approach taken to handle API rate limits, as this is a common challenge when working with large datasets and external APIs. The use of batch requests and managing throttling is a great example of how to optimize performance while staying within the API's constraints. I've had similar experiences with API rate limits in my own projects, and I'm curious to know more about how you implemented the logic for handling these limits - were there any specific techniques or libraries that helped simplify this process?

Collapse
 
darksaces profile image
Daniel

Thanks! The main techniques were batch requests (50 artists / 100 tracks per call to stay within Spotify's limits) and reactive throttling — catching HTTP 429 errors and sleeping exactly as long as the Retry-After header says before retrying. No special libraries, just Spotipy + manual retry logic with time.sleep(). Simple but effective at this scale. Being a small project, I don't manage per-user rate budgets or anything like that — though I'd like to expand it to handle multiple API fallbacks in case one goes down, but that's not a current priority.

Collapse
 
topstar_ai profile image
Luis Cruz

Great insights, Daniel! The retry handling approach with Retry-After and controlled batching is a clean solution for this scale. I really like how you kept the implementation simple while still making it reliable.

I’d love to collaborate if you ever need help extending Spotify Toolkit, improving the architecture, adding new features, or working on other Python/AI/software projects. I focus on delivering high-quality results with a practical approach, fast turnaround, and flexible cost options for early-stage projects or open-source creators.

Feel free to reach out anytime — happy to contribute, exchange ideas, or help bring new features to life. 🚀

Thread Thread
 
darksaces profile image
Daniel

Thanks for the feedback! I'm glad you liked the retry handling and batching approach.

Right now I'm handling the project on my own and not looking for paid services or dedicated help, but since Spotify Toolkit is open source, you're more than welcome to check out the open issues or submit a PR if you ever feel like contributing code or sharing ideas!

Thanks again for reaching out!

Thread Thread
 
topstar_ai profile image
Comment deleted
Thread Thread
 
topstar_ai profile image
Luis Cruz

Thanks, Daniel! I appreciate the invitation.

I actually found an issue that looks interesting, so I'll take a shot at #37 and submit a PR if everything goes well. It seems like a great opportunity to get familiar with the codebase while contributing something useful.

Beyond this project, I'd also be happy to stay in touch. I always enjoy connecting with developers who are passionate about building practical, well-designed software. Feel free to send me a DM anytime if you'd like to exchange ideas, discuss Python, AI, or open source, or just chat about future projects.

Looking forward to contributing—and hopefully becoming friends through the open-source community. 🚀

Some comments may only be visible to logged-in visitors. Sign in to view all comments.