{
  "id": 6988876,
  "title": "How I built a CLI music player in Python and what I learned",
  "url": "https://urgent.news/2026/09/12/how-i-built-a-cli-music-player-in-python-and-what-i-learned",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-12T20:19:55.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/tagouli/how-i-built-a-cli-music-player-in-python-and-what-i-learned-5a4e"
  },
  "original_language": "en",
  "account": "A Python programmer, who had been mastering the language through tutorials, chose to create a practical application rather than a simple to-do list. The outcome was a command line music player that connected with the Deezer API to search for artists and songs, used yt-dlp for audio fetching and streaming, VLC for playback control, and SQLite for local storage of playlists and favorite artists.\n\nThe tools at the programmer's disposal included the Deezer API for accessing music data, yt-dlp for handling audio, VLC for playback management, SQLite for storing playlists and favorite artists, and requests for making API calls.\n\nOne aspect stood out as particularly intriguing. When the programmer added the capability to save artists and songs at the same time, they encountered a \"database locked\" error. Initially, they hypothesized a missing commit, having inadvertently executed two commits following each insertion. Even after merging the commits, the error persisted. Eventually, it was discovered that a previous development version had left a database connection open. This lingering connection was running in the background, locking the database. By terminating the processes, and ensuring proper connection closure upon exit, the issue was resolved swiftly.\n\nThe programmer learned an important lesson: the bug might not always be in the line of code they're currently examining; it could also reside in the system or the environment itself. Their next steps involved developing a graphical user interface, packaging the application for easy installation, conducting extensive testing, and sharing the project on GitHub. Their GitHub repository address is https://github.com/Iheb-eng/music-app. They welcome any feedback or suggestions.",
  "summary": "After months of learning Python through tutorials, I decided to build something I'd actually use every day and I really want to build instead of todo app. The result: a command line music player that integrates with the Deezer API, plays audio through yt-dlp and VLC, and stores playlists and favorite artists in a local SQLite database. What I used: Deezer API > search artists and songs yt-dlp >…",
  "key_points": [
    "Programmer built CLI music player using Python, Deezer API, yt-dlp, VLC, and SQLite.",
    "Encountered \"database locked\" error due to lingering connection; resolved by closing connections.",
    "Plans to develop GUI, package app, test extensively, and share on GitHub."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}