{"library":"pyobjc-framework-shazamkit","title":"PyObjC ShazamKit Framework","description":"PyObjC-framework-shazamkit provides Python bindings for Apple's ShazamKit framework on macOS, allowing Python applications to identify music and audio using Shazam's technology. It's part of the larger PyObjC project, which offers comprehensive access to macOS frameworks. The current version is 12.1, with releases typically tied to macOS SDK updates and Python version support changes.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install pyobjc-framework-shazamkit"],"cli":null},"imports":["from ShazamKit import SHSession","from ShazamKit import SHMediaItem","from ShazamKit import SHSignature"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import platform\nfrom ShazamKit import SHMediaItem, SHErrorDomain, SHSession\n\nif platform.system() != \"Darwin\":\n    print(\"ShazamKit is a macOS-only framework. This code will only execute PyObjC specific parts on macOS.\")\nelse:\n    try:\n        # Verify core PyObjC bridge and ShazamKit framework are loadable\n        _ = SHMediaItem  # Accessing a class to ensure it's bound\n        _ = SHSession\n        error_domain = SHErrorDomain # Accessing a constant\n\n        print(f\"Successfully imported ShazamKit framework on macOS.\")\n        print(f\"SHMediaItem class type: {type(SHMediaItem)}\")\n        print(f\"SHErrorDomain constant: {error_domain}\")\n\n        # To use ShazamKit effectively, you would typically:\n        # 1. Request microphone permissions.\n        # 2. Create an SHSession with a custom SHSessionDelegate (inheriting from objc.retains('SHSessionDelegate')).\n        # 3. Capture audio and create an SHSignature.\n        # 4. Call session.matchSignature(signature).\n        # This quickstart merely confirms the library's basic availability.\n\n    except ImportError:\n        print(\"Error: ShazamKit framework not found. Ensure 'pyobjc-framework-shazamkit' is installed and you are on macOS.\")\n    except Exception as e:\n        print(f\"An unexpected error occurred: {e}\")","lang":"python","description":"This quickstart verifies that the PyObjC ShazamKit binding can be imported and its core components (classes, constants) are accessible. Note that actual ShazamKit functionality (audio recording, matching) requires microphone permissions, an `SHSessionDelegate` implementation, and often an `NSRunLoop` for asynchronous operations, which are beyond this basic setup.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-16","installed_version":null,"pypi_latest":"12.1","is_stale":null,"summary":{"python_range":"3.10–3.9","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pyobjc-framework-shazamkit","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pyobjc-framework-shazamkit","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":2.9,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pyobjc-framework-shazamkit","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pyobjc-framework-shazamkit","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":2.9,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pyobjc-framework-shazamkit","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pyobjc-framework-shazamkit","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":2.8,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pyobjc-framework-shazamkit","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pyobjc-framework-shazamkit","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":2.5,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pyobjc-framework-shazamkit","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pyobjc-framework-shazamkit","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":3.4,"import_time_s":null,"mem_mb":null,"disk_size":null}]}}