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.extract module
- eyed3.plugins.fixup module
- eyed3.plugins.genres module
- eyed3.plugins.itunes module
- eyed3.plugins.jsontag module
- eyed3.plugins.lameinfo module
- eyed3.plugins.lastfm module
- eyed3.plugins.mimetype module
- eyed3.plugins.nfo module
- eyed3.plugins.pymod module
- eyed3.plugins.stats module
- eyed3.plugins.xep_118 module
- eyed3.plugins.yamltag module
- Module contents
- eyed3.utils package
Submodules¶
eyed3.core module¶
Basic core types and utilities.
-
class
eyed3.core.
ArtistOrigin
(city: str, state: str, country: str)[source]¶ Bases:
object
-
city
: str = None¶
-
state
: str = None¶
-
country
: str = None¶
-
-
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¶
-
size_bytes
= 0¶
-
-
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¶
-
property
title
¶
-
property
artist
¶
-
property
album
¶
-
property
album_artist
¶
-
property
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.
-
property
info
¶ Returns a concrete implemenation of
eyed3.core.AudioInfo
-
property
tag
¶ Returns a concrete implemenation of
eyed3.core.Tag
-
property
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.
-
property
year
¶
-
property
month
¶
-
property
day
¶
-
property
hour
¶
-
property
minute
¶
-
property
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
eyed3.mimetype module¶
-
class
eyed3.mimetype.
Mp2x
[source]¶ Bases:
filetype.types.base.Type
Implements the MP2.x audio type matcher.
-
MIME
= 'audio/mpeg'¶
-
EXTENSION
= 'mp3'¶
-
-
class
eyed3.mimetype.
Mp3Invalids
[source]¶ Bases:
filetype.types.base.Type
Implements a MP3 audio type matcher this is odd or/corrupt mp3.
-
MIME
= 'audio/mpeg'¶
-
EXTENSION
= 'mp3'¶
-
-
class
eyed3.mimetype.
Id3Tag
[source]¶ Bases:
filetype.types.base.Type
Implements a MP3 audio type matcher this is odd or/corrupt mp3.
-
MIME
= 'application/x-id3'¶
-
EXTENSION
= 'id3'¶
-
-
class
eyed3.mimetype.
Id3TagExt
[source]¶ Bases:
eyed3.mimetype.Id3Tag
-
EXTENSION
= 'tag'¶
-
Module contents¶
-
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.