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")
# check the playlist type
assert(not playlist.is_smart())
assert(not playlist.is_folder())
# 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)
Contributors
Release files for iTunesLibrary 1.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ituneslibrary-1.2.5.tar.gz | 25.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ituneslibrary-1.2.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.9 kB
Release files / ituneslibrary-1.2.5.tar.gz
| Download URL | ituneslibrary-1.2.5.tar.gz |
|---|---|
| Size | 25.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fad64268fc13dde3ab6299302b1e7b7e24dec94b3be7ced87b1a01562d3190d7
|
|
BLAKE2b-256 checksum How to use checksums |
7a5d56110e7aab8d39a9e87bfc3d1e2bb6261692de5f417b2588feed5ffba8f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / ituneslibrary-1.2.5-py3-none-any.whl
| Download URL | ituneslibrary-1.2.5-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a1cd3d76aa9229d0dcc2a1acf42b3f8e9071d3dafb63f6dc7e382470dbc5e06f
|
|
BLAKE2b-256 checksum How to use checksums |
f8b6905787331cbcf6edef4e992a42c181177da42a92b1fab11d48bc1a873098
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|