Metadata-Version: 2.4
Name: iTunesLibrary
Version: 1.2.4
Summary: itunesLibrary represents an iTunes Library.
Project-URL: Homepage, https://pypi.org/project/iTunesLibrary/
Project-URL: Repository, https://github.com/scholnicks/itunes-library/
Author-email: Steve Scholnick <scholnicks@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: Apple,Library,Music,XML,iTunes
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Utilities
Requires-Python: >=3.14
Requires-Dist: docopt-ng<0.10.0,>=0.9.0
Description-Content-Type: text/markdown

# 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 :
```bash
pip install itunesLibrary
```

## Example Code

```python
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
* scholnicks@gmail.com
* software@froissart.eu
