Skip to main content

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

Metadata

Release files for iTunesLibrary 1.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iTunesLibrary 1.2.6
File Size Uploaded Provenance Actions
ituneslibrary-1.2.6.tar.gz 25.0 kB Without provenance Details for ituneslibrary-1.2.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for iTunesLibrary 1.2.6
File Interpreter ABI Platform Actions
ituneslibrary-1.2.6-py3-none-any.whl Python 3 none any Details for ituneslibrary-1.2.6-py3-none-any.whl

Total release size: 30.9 kB

Release files / ituneslibrary-1.2.6.tar.gz

Download URL ituneslibrary-1.2.6.tar.gz
Size 25.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e51c9aaf8c101b901218877497d57c7804de03b4cd34cf5cfa04030a41a01449
BLAKE2b-256 checksum
How to use checksums
6c0fe9c10b10340fb8f99663e5fcef9920ba586adb0541b51f75c2ff65a7f4b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","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.6-py3-none-any.whl

Download URL ituneslibrary-1.2.6-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c76852add4b9ad2f46b127438336901404baa9e9f1c7cd2f06f3a71cd058bf9
BLAKE2b-256 checksum
How to use checksums
92d7d5946ee91296b6a7e7eba640cbb459989b2ffe8d2f21fcd2cfd1b45126a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","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}

Security for iTunesLibrary 1.2.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page