PyObjC CoreAudioKit Framework

12.1 · active · verified Tue Apr 14

PyObjC is a bridge between Python and Objective-C, enabling Python scripts to use and extend existing Objective-C class libraries, most importantly Apple's Cocoa frameworks on macOS. The `pyobjc-framework-coreaudiokit` package provides Python wrappers specifically for the CoreAudioKit framework. It is currently at version 12.1 and maintains an active release cadence, typically aligning with macOS SDK updates and Python version support.

Warnings

Install

Imports

Quickstart

This example demonstrates how to import a class from the CoreAudioKit framework and access its underlying Objective-C class object, verifying the PyObjC bridge is functioning for this framework. CoreAudioKit primarily offers UI components, so full interactive functionality typically requires an active Cocoa application run loop.

import objc
from CoreAudioKit import CAMultiColumnBrowser

def quickstart_example():
    print("Demonstrating PyObjC CoreAudioKit import and class access.")
    try:
        # Access the underlying Objective-C class object
        # This verifies the framework is loaded and the class is accessible.
        objc_class = CAMultiColumnBrowser.ObjC_CLASS
        print(f"Successfully accessed Objective-C class: {objc_class.className()}")
        print("Note: CoreAudioKit largely consists of UI components. Full functionality requires an active Cocoa application run loop.")
    except Exception as e:
        print(f"Error accessing CoreAudioKit class: {e}")
        print("Ensure you are on macOS and PyObjC is correctly installed.")

if __name__ == '__main__':
    quickstart_example()

view raw JSON →