Skip to main content

Fully reverse engeenired shazam api

Project description

shazam.py

Python library for the Shazam API. This library is based off of ShazamAPI by Numenorean but some added features.

Install

pip3 install shazam.py

You'll also need to have ffmpeg installed and added to PATGH.

Usage

Synchronous Shazam:

from shazam import Shazam

mp3_file_content_to_recognize = open('a.mp3', 'rb').read()

with Shazam(mp3_file_content_to_recognize) as results:
    for res in results:
        print(res)  # current offset & shazam response to recognize requests

Asynchronous operations are also supported:

from shazam import AsyncShazam

mp3_file_content_to_recognize = open('a.mp3', 'rb').read()

async with AsyncShazam(mp3_file_content_to_recognize) as results:
    async for res in results:
        print(res)

There is also support for using your own session objects and using Shazam and AsyncShazam outside of a context manager.

Credits to:

https://github.com/Numenorean/ShazamAPI (and by proxy, https://github.com/marin-m/SongRec)

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

shazam.py-1.0.0a0.tar.gz (10.3 kB view hashes)

Uploaded Source

Built Distribution

shazam.py-1.0.0a0-py3-none-any.whl (10.1 kB view hashes)

Uploaded Python 3

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