# 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
Raw data
{
"_id": null,
"home_page": "https://github.com/scholnicks/itunes-library",
"name": "iTunesLibrary",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "iTunesLibrary, iTunes",
"author": "Steven Scholnick",
"author_email": "scholnicks@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/97/46/010859c8f4c0a2bd5657f02cc906b3550ee7ed60f19a883700ab7409b330/ituneslibrary-1.2.1.tar.gz",
"platform": null,
"description": "# itunesLibrary\n==============\n\nitunesLibrary represents an iTunes Library. It allows the caller to retrieve items, playlists, etc.\n\nitunesLibrary is a port of Drew Stephen's excellent Perl module, https://github.com/dinomite/Mac-iTunes-Library. The Perl\nlibrary will be **not** re-created verbatim.\n\nInstallation :\n```bash\npip install itunesLibrary\n```\n\n## Example Code\n\n```python\nimport os\nfrom itunesLibrary import library\n\npath = os.path.join(os.getenv(\"HOME\"),\"Music/iTunes/iTunes Music Library.xml\")\n\n# must first parse...\nlib = library.parse(path)\n\nprint(len(lib)) # number of items stored\n\nfor playlist in lib.playlists:\n for item in playlist.items:\n print(item) # perform function on each item in the playlist\n\n# get a single playlist\nplaylist = lib.getPlaylist(\"Gray\")\n\n# check the playlist type\nassert(not playlist.is_smart())\nassert(not playlist.is_folder())\n\n# get a list of all of the David Bowie songs\nbowie_items = lib.getItemsForArtist(\"David Bowie\")\n\n# get a single song\nsingle_song = lib.getItemsById(\"16116\")\n\n# get the iTunes application version\nprint(lib.applicationVersion)\n```\n\n## Contributors\n* scholnicks@gmail.com\n* software@froissart.eu\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Represents an iTunes library",
"version": "1.2.1",
"project_urls": {
"Download": "https://github.com/scholnicks/itunes-library",
"Homepage": "https://github.com/scholnicks/itunes-library"
},
"split_keywords": [
"ituneslibrary",
" itunes"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "648c01436c1f5834fec8e932d83b8ab7ba5a2f0554b96ed0754a033638bf346c",
"md5": "9a7af151ac3fd8152da50d0b62e56eeb",
"sha256": "5bc3ad035050a592bb1ce79b2db190f43d2fb24bad83c645721cb1c75b11fc03"
},
"downloads": -1,
"filename": "iTunesLibrary-1.2.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "9a7af151ac3fd8152da50d0b62e56eeb",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 6200,
"upload_time": "2024-12-21T18:29:16",
"upload_time_iso_8601": "2024-12-21T18:29:16.635082Z",
"url": "https://files.pythonhosted.org/packages/64/8c/01436c1f5834fec8e932d83b8ab7ba5a2f0554b96ed0754a033638bf346c/iTunesLibrary-1.2.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9746010859c8f4c0a2bd5657f02cc906b3550ee7ed60f19a883700ab7409b330",
"md5": "ca4dec6bf4cd15943d9996471895bc6f",
"sha256": "80ecbadfc3a7bdaf0efb3acdad1635fe9e85e11d54103400f7d2b4216fcd17f2"
},
"downloads": -1,
"filename": "ituneslibrary-1.2.1.tar.gz",
"has_sig": false,
"md5_digest": "ca4dec6bf4cd15943d9996471895bc6f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5257,
"upload_time": "2024-12-21T18:29:18",
"upload_time_iso_8601": "2024-12-21T18:29:18.519678Z",
"url": "https://files.pythonhosted.org/packages/97/46/010859c8f4c0a2bd5657f02cc906b3550ee7ed60f19a883700ab7409b330/ituneslibrary-1.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-21 18:29:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "scholnicks",
"github_project": "itunes-library",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "ituneslibrary"
}