Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
A simple python wrapper for accessing the iTunes Store API iTunes Store API <http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html>
_
To install with pip <http://www.pip-installer.org/>
_, just run this in your terminal::
$ pip install pyitunes
Or clone the code from Github <https://github.com/moogar0880/python-itunes>
_ and::
$ python setup.py install
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.
Search
::
from __future__ import print_function
import itunes
# Search band U2
artist = itunes.search_artist('u2')[0]
for album in artist.get_albums():
for track in album.get_tracks():
print(album.name, album.url, track.name, track.duration, track.preview_url)
# Search U2 videos
videos = itunes.search(query='u2', media='musicVideo')
for video in videos:
print(video.name, video.preview_url, video.artwork)
# Search Volta album by Björk
album = itunes.search_album('Volta Björk')[0]
# Global Search 'Beatles'
items = itunes.search(query='beatles')
for item in items:
print('[' + item.type + ']', item.artist, item.name, item.url, item.release_date)
# Search 'Angry Birds' game
item = itunes.search(query='angry birds', media='software')[0]
vars(item)
# Search 'Family Guy Season 1'
item = itunes.search_season('Family Guy Season 1')[0]
vars(item)
# Search 'Episode 5 of Family Guy Season 1'
items = itunes.search_episode('Family Guy Season 1')
for ep in items:
if ep.episode_number == 5:
vars(ep)
Lookup
::
import itunes
U2_ACHTUNGBABY_ID = 475390461 album = itunes.lookup(U2_ACHTUNGBABY_ID)
print(album.url) print(album.artwork)
artist = album.artist tracks = album.get_tracks()
U2_ONE_ID = 475391315 track = itunes.lookup(U2_ONE_ID)
artist = track.artist album = track.get_album()
::
$ py.test tests
FAQs
A simple python wrapper to access iTunes Store API
We found that pyitunes demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.