Skip to main content

A simple python wrapper to access iTunes Store API

Project description

A simple python wrapper for accessing the iTunes Store API iTunes Store API

Installation

To install with pip, just run this in your terminal:

$ pip install pyitunes

Or clone the code from Github and:

$ python setup.py install

Caching

This module caches responses from the iTunes API to speed up repeated queries against the same resources. Note, however, that there’s no persistent caching that happens between Python processes. Ie, once a python process exits, the cache is cleared.

Examples

Lookup

import itunes

# Lookup Achtung Baby album by U2
U2_ACHTUNGBABY_ID = 475390461
album = itunes.lookup(U2_ACHTUNGBABY_ID)

print(album.url)
print(album.artwork)

artist = album.artist
tracks = album.get_tracks()

# Lookup song One from Achtung Baby album by U2
U2_ONE_ID = 475391315
track = itunes.lookup(U2_ONE_ID)

artist = track.artist
album = track.get_album()

Tests

$ py.test tests

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

pyitunes-1.0.0.tar.gz (5.8 kB view details)

Uploaded Source

File details

Details for the file pyitunes-1.0.0.tar.gz.

File metadata

  • Download URL: pyitunes-1.0.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyitunes-1.0.0.tar.gz
Algorithm Hash digest
SHA256 57bfe3d7770f5fc6157e40f50b6838f0be5c2b3b666ff7d58cc649b3584c9a28
MD5 29948a23a637b8a77a7bde5b9cf1dcbb
BLAKE2b-256 2792b970b9abffb5f89abebca9b0c4b36e608dcfa194d92950b5420d3eaab71c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page