Registry /
aws / pyobjc-framework-classkit
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
build_error
glibcpy 3.10–3.920 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ClassKit
✓ import ClassKit
CLSContext
✓ import ClassKit
context = ClassKit.CLSContext.currentContext()
This quickstart demonstrates how to import the ClassKit framework and access the current ClassKit context. Note that ClassKit operations require an active macOS application context, appropriate entitlements, and user authorization to function correctly. This code is illustrative and would typically run within a larger PyObjC-based macOS application.
import ClassKit
from Cocoa import NSObject, NSLog # For basic logging or NSObject base
# ClassKit operations must typically be run on the main thread and
# within a macOS application context. This is a conceptual example.
# In a real app, you would interact with CLSDataStore and CLSContext.
# Get the current ClassKit context (requires user authorization and an active app)
current_context = ClassKit.CLSContext.currentContext()
if current_context:
NSLog(f"ClassKit context loaded: {current_context.title()}")
# Example: Create a new activity for the current context
# This part requires proper setup of CLSActivity, CLSActivityItem etc.
# and permissions. This is a simplified example.
# activity = ClassKit.CLSActivity()
# activity.setTitle_("My Python Activity")
# current_context.addActivity_(activity)
# ClassKit.CLSDataStore.shared().saveWithCompletion_(
# lambda success, error: NSLog(f"Activity save success: {success}, error: {error}")
# )
else:
NSLog("ClassKit context not available. Ensure app is authorized and running on macOS.")
# In a real macOS app, you might also have a PyObjC application loop running.
Debug
Known issues
breakingPython 3.9 support was dropped in PyObjC 12.0, and Python 3.8 support was dropped in PyObjC 11.0. Ensure your Python version meets the requirements for the installed PyObjC version (e.g., PyObjC 12.x requires Python >=3.10).fixUpgrade your Python environment to 3.10 or newer if using PyObjC 12.x, or 3.9 or newer if using PyObjC 11.x.
affects: >=11.0
breakingPyObjC 11.1 introduced significant changes to align the core bridge's Automatic Reference Counting (ARC) behavior with `clang`'s documentation, particularly for initializer methods. Methods in the 'init' family now correctly steal a reference to `self` and return a new one.fixReview PyObjC code that defines or interacts with Objective-C initializer methods to ensure correct reference counting and object lifecycle management, especially when upgrading from versions prior to 11.1.
affects: >=11.1
gotchaClassKit, like all PyObjC frameworks, is specific to macOS. Code using `pyobjc-framework-classkit` will only run on macOS and requires the necessary macOS SDKs and entitlements for specific operations (e.g., accessing sensitive educational data).fixDevelop and deploy applications using this library exclusively on macOS. Ensure your application has the correct entitlements and permissions configured in Xcode if interacting with system services.
affects: All versions
gotchaIn PyObjC 10.3, the ability to use `__init__` when a user also provided `__new__` was temporarily removed, causing issues. This was reinstated in version 10.3.1. Code relying on PyObjC's provided `__new__` still cannot use `__init__`.fixIf encountering issues with `__init__` and `__new__` for custom Objective-C classes, upgrade to PyObjC 10.3.1 or later. Avoid using `__init__` if your class relies on PyObjC's default `__new__` implementation.
affects: 10.3
breakingOlder Objective-C frameworks might be removed from PyObjC bindings in newer versions if they are deprecated or removed from macOS. For example, 'IMServicePlugIn' bindings were removed in PyObjC 10.0 due to its deprecation and removal in macOS.fixRegularly check release notes for major PyObjC versions for any removed framework bindings. Update your application's dependencies or logic if a previously used framework is no longer available in PyObjC.
affects: >=10.0 (and subsequent major releases)
Upgrade
Version history
12.2latest on PyPI · released May 30, 2026
Audit
Dependencies
pyobjc-corerequiredAll pyobjc-framework-* packages depend on the core bridge.