Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 184649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:19:46+00:00 2026-05-11T15:19:46+00:00

So, here’s the deal. I am attempting to write a quick python script that

  • 0

So, here’s the deal. I am attempting to write a quick python script that reads the basic id3 tags from an mp3 (artist, album, songname, genre, etc). The python script will use most likely the mutagen library (unless you know of a better one). I’m not sure how to recursively scan through a directory to get each mp3’s tags, and then fill a database. Also, as far as the database end, I want to make it as solid as possible, so I was wondering if anyone had any ideas on how I should design the database itself. Should I just use one big table, should I use certain relationships, etc. I am not very good at relational databases so I would appreciate any help. Oh, this is running on a linux box.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T15:19:46+00:00Added an answer on May 11, 2026 at 3:19 pm

    To get started with extracting ID3 tags in Python, there’s a module for that.

    from ID3 import ID3  mp3_filepath = r'/music/song.mp3' id3_data = ID3(mp3_filepath) print 'Artist:', id3_data['ARTIST'] print 'Title:', id3_data['TITLE'] 

    More info on ID3 module.

    If you want to recursively search a directory for mp3 files, the built-in os module can do that:

    import os  def mp3_files(root):   # this is a generator that will return mp3 file paths within given dir   for f in os.listdir(root):       fullpath = os.path.join(root,f)       if os.path.isdir(fullpath) and not os.path.islink(fullpath):           for x in mp3_files(fullpath):  # recurse into subdir               yield x       else:           if fullpath[len(fullpath)-3:] == 'mp3':             yield fullpath  for p in mp3_files(root_dir):   id3_data = ID3(p)   print 'Artist:', id3_data['ARTIST']   print 'Title:', id3_data['TITLE'] 

    Reference.

    In terms of creating the database, you don’t need to reinvent the wheel (storing music data is a common database problem) — a Google search will help you out. Here’s one example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 87k
  • Answers 87k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Found it! The issue is that I was using a… May 11, 2026 at 5:35 pm
  • Editorial Team
    Editorial Team added an answer The problem was in another part of the stored procedure.… May 11, 2026 at 5:35 pm
  • Editorial Team
    Editorial Team added an answer Yes, it sounds like this method needs to take a… May 11, 2026 at 5:35 pm

Related Questions

So I'm just confused here. I've got to migrate my database from MySQL to
So what I'm looking for here is something like PHP's print_r function. This is
So my goal here is to have a single search field in an application
So here is the simple code: [System.ComponentModel.DefaultValue(true)] public bool AnyValue { get; set; }
So here I am just about to start a big project using LINQ to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.