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.1.tar.gz (6.4 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for pyitunes-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7110700203b09443c3714d97535e527ba6c2900c25acf2a50ac5069234166b07
MD5 e004eb95350f2e6544eeb6096ebe0cbc
BLAKE2b-256 45f3f21592c0aee05d8a662d8b8ba12bf3e716dcf8f673254b9b827e91d1c2d1

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