Represents an iTunes library
Project description
itunesLibrary
itunesLibrary represents an iTunes Library. It allows the caller to retrieve items, playlists, etc.
itunesLibrary is a port of Drew Stephen's excellent Perl module, https://github.com/dinomite/Mac-iTunes-Library. The Perl library will be not re-created verbatim.
Installation : pip install itunesLibrary
Example Code
import os
from itunesLibrary import library
path = os.path.join(os.getenv("HOME"),"Music/iTunes/iTunes Music Library.xml")
# must first parse...
lib = library.parse(path)
print len(lib) # number of items stored
for playlist in lib.playlists:
for item in playlist.items:
print(item) # perform function on each item in the playlist
# get a single playlist
playlist = lib.getPlaylist("Gray")
# get a list of all of the David Bowie songs
bowie_items = lib.getItemsForArtist("David Bowie")
# get a single song
single_song = lib.getItemsById("16116")
# get the iTunes application version
print(lib.applicationVersion)
© Steve Scholnick scholnicks@gmail.com
MIT License, see https://scholnick.net/license.txt
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iTunesLibrary-1.1.5.tar.gz.
File metadata
- Download URL: iTunesLibrary-1.1.5.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0547b3def6c5233a95a40779a1d2037d29c70f3e370785a192372d37931da79
|
|
| MD5 |
18431184c803d74792834089274ebca8
|
|
| BLAKE2b-256 |
a8dc38964707e47968dff310c78ea63b6c92cd2fface326484a860aca4a5b711
|
File details
Details for the file iTunesLibrary-1.1.5-py2.py3-none-any.whl.
File metadata
- Download URL: iTunesLibrary-1.1.5-py2.py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6fa9e42ce06d0c2e292e02a57acb742e8a9c6742d17b3029e7579fb3484ee3a
|
|
| MD5 |
be47076135e5ed8b551848db51ccfde4
|
|
| BLAKE2b-256 |
af41d5d62851cdce343c494c407621c2559d7107947a65d71edfdce12e85e3be
|