eyed3 package¶
Subpackages¶
- eyed3.id3 package
- eyed3.mp3 package
- eyed3.plugins package
- Submodules
- eyed3.plugins.art module
- eyed3.plugins.classic module
- eyed3.plugins.display module
- eyed3.plugins.fixup module
- eyed3.plugins.genres module
- eyed3.plugins.itunes module
- eyed3.plugins.lameinfo module
- eyed3.plugins.nfo module
- eyed3.plugins.pymod module
- eyed3.plugins.stats module
- eyed3.plugins.xep_118 module
- Module contents
- eyed3.utils package
Submodules¶
eyed3.compat module¶
Compatibility for various versions of Python (e.g. 2.6, 2.7, and 3.3)
-
eyed3.compat.
byteOrd
(bite)[source]¶ The utility handles the following difference with byte strings in Python 2 and 3:
b”123”[1] == b”2” (Python2) b”123”[1] == 50 (Python3)As this function name implies, the oridinal value is returned given either a byte string of length 1 (python2) or a integer value (python3). With Python3 the value is simply return.
-
eyed3.compat.
importmod
(mod_file)[source]¶ Imports a Ptyhon module referenced by absolute or relative path
mod_file
. The module is retured.
-
class
eyed3.compat.
UnicodeMixin
[source]¶ Bases:
object
A shim to handlke __unicode__ missing from Python3. Inspired by: http://lucumr.pocoo.org/2011/1/22/forwards-compatible-python/
eyed3.core module¶
Basic core types and utilities.
-
eyed3.core.
AUDIO_NONE
= 0¶ Audio type selecter for no audio.
-
eyed3.core.
AUDIO_MP3
= 1¶ Audio type selecter for mpeg (mp3) audio.
-
eyed3.core.
TXXX_ALBUM_TYPE
= 'eyeD3#album_type'¶ A key that can be used in a TXXX frame to specify the type of collection (or album) a file belongs. See
eyed3.core.ALBUM_TYPE_IDS
.
-
eyed3.core.
TXXX_ARTIST_ORIGIN
= 'eyeD3#artist_origin'¶ A key that can be used in a TXXX frame to specify the origin of an artist/band. i.e. where they are from. The format is: city<tab>state<tab>country
-
eyed3.core.
load
(path, tag_version=None)[source]¶ Loads the file identified by
path
and returns a concrete type ofeyed3.core.AudioFile
. Ifpath
is not a file anIOError
is raised.None
is returned when the file type (i.e. mime-type) is not recognized. The following AudioFile types are supported:eyed3.mp3.Mp3AudioFile
- For mp3 audio files.eyed3.id3.TagFile
- For raw ID3 data files.
If
tag_version
is not None (the default) only a specific version of metadata is loaded. This value must be a version constant specific to the eventual format of the metadata.
-
class
eyed3.core.
AudioInfo
[source]¶ Bases:
object
A base container for common audio details.
-
time_secs
= 0.0¶ The number of seconds of audio data (i.e., the playtime)
-
size_bytes
= 0¶ The number of bytes of audio data.
-
-
class
eyed3.core.
Tag
(title=None, artist=None, album=None, album_artist=None, track_num=None)[source]¶ Bases:
object
An abstract interface for audio tag (meta) data (e.g. artist, title, etc.)
-
read_only
= False¶
-
title
¶
-
artist
¶
-
album
¶
-
album_artist
¶
-
track_num
¶ Track number property. Must return a 2-tuple of (track-number, total-number-of-tracks). Either tuple value may be
None
.
-
-
class
eyed3.core.
AudioFile
(path)[source]¶ Bases:
object
Abstract base class for audio file types (AudioInfo + Tag)
Construct with a path and invoke
_read
. All other members are set to None.-
rename
(name, fsencoding='utf-8', preserve_file_time=False)[source]¶ Rename the file to
name
. The encoding used for the file name iseyed3.LOCAL_FS_ENCODING
unless overridden byfsencoding
. Note, if the target file already exists, or the full path contains non-existent directories the operation will fail withIOError
. File times are not modified whenpreserve_file_time
isTrue
,False
is the default.
-
info
¶ Returns a concrete implemenation of
eyed3.core.AudioInfo
-
tag
¶ Returns a concrete implemenation of
eyed3.core.Tag
-
path
¶ The absolute path of this file.
-
-
class
eyed3.core.
Date
(year, month=None, day=None, hour=None, minute=None, second=None)[source]¶ Bases:
object
A class for representing a date and time (optional). This class differs from
datetime.datetime
in that the default values for month, day, hour, minute, and second isNone
and not ‘January 1, 00:00:00’. This allows for an object that is simply 1987, and not January 1 12AM, for example. But when more resolution is required those vales can be set as well.-
TIME_STAMP_FORMATS
= ['%Y', '%Y-%m', '%Y-%m-%d', '%Y-%m-%dT%H', '%Y-%m-%dT%H:%M', '%Y-%m-%dT%H:%M:%S', '%Y-%m-%dT%HZ', '%Y-%m-%dT%H:%MZ', '%Y-%m-%dT%H:%M:%SZ', '%Y-%m-%d %H:%M:%S', '%Y-00-00', '%Y%m%d']¶ Valid time stamp formats per ISO 8601 and used by strptime.
-
year
¶
-
month
¶
-
day
¶
-
hour
¶
-
minute
¶
-
second
¶
-
eyed3.main module¶
-
eyed3.main.
profileMain
(args, config)[source]¶ This is the main function for profiling http://code.google.com/appengine/kb/commontasks.html#profiling
Module contents¶
-
eyed3.
LOCAL_ENCODING
= 'UTF-8'¶ The local encoding, used when parsing command line options, console output, etc. The default is always
latin1
if it cannot be determined, it is NOT the value shown.
-
eyed3.
LOCAL_FS_ENCODING
= 'utf-8'¶ The local file system encoding, the default is
latin1
if it cannot be determined.
-
eyed3.
load
(path, tag_version=None)[source]¶ Loads the file identified by
path
and returns a concrete type ofeyed3.core.AudioFile
. Ifpath
is not a file anIOError
is raised.None
is returned when the file type (i.e. mime-type) is not recognized. The following AudioFile types are supported:eyed3.mp3.Mp3AudioFile
- For mp3 audio files.eyed3.id3.TagFile
- For raw ID3 data files.
If
tag_version
is not None (the default) only a specific version of metadata is loaded. This value must be a version constant specific to the eventual format of the metadata.