Registry / ai-ml / shazamio

shazamio

JSON →
library0.8.1pypypi✓ verified 84d ago

Asynchronous Python wrapper for the Shazam API, reverse-engineered and built with asyncio and aiohttp. Currently at version 0.8.1, supports Python 3.10+. Active development with periodic releases.

pip install shazamio
INSTALL
IMPORT
SIG · SHAZAMIO
S
shazamio
ai-mlpythonv0.8.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Shazam
from shazamio import Shazam

Basic usage to recognize a song from a file.

import asyncio from shazamio import Shazam async def main(): shazam = Shazam() result = await shazam.recognize('song.mp3') print(result) asyncio.run(main())
Debug
Known issues
breakingVersion 0.8.0+ requires Python 3.10 or higher. Older Python versions (3.8, 3.9) are no longer supported.
fix
Upgrade Python to 3.10+ or pin shazamio to <0.8.0 if you must use older Python.
affects: >=0.8.0
gotchaThe library is reverse-engineered, so the API may break without notice if Shazam changes their backend. Do not rely on it for critical production use.
fix
Have fallback mechanisms or monitor the GitHub repo for updates.
affects: all
deprecatedThe old synchronous usage (e.g., Shazam().recognize_song) has been removed. All methods are now async-only.
fix
Use await shazam.recognize(...) with asyncio.
affects: >=0.7.0
Errors
Common errors & fixes
RuntimeError: Task <Task pending name='Task-1' coro=<...>> got Future <Future pending> attached to a different loop
Async code is run in an environment with an existing event loop (e.g., Jupyter, some IDEs).
fix
Use asyncio.run() or nest_asyncio.apply() in Jupyter notebooks.
ImportError: cannot import name 'Shazam' from 'shazamio'
Possibly an outdated version where the class was named differently or located in a submodule.
fix
Upgrade to the latest version: pip install --upgrade shazamio
Upgrade
Version history
0.8.1latest on PyPI · released Jun 11, 2025
Audit
Dependencies
aiohttprequiredHTTP client for async requests
pydanticrequiredData validation and settings
Agent activity
13 hits · last 30 days
node
10
OpenAI (training)
1
Resources
shazamio — pip install shazamio · libregistry