Registry / pyobjc-framework-kernelmanagement

pyobjc-framework-kernelmanagement

JSON →
library12.2pypypiunverified

pyobjc-framework-kernelmanagement provides Python wrappers for the macOS KernelManagement framework. It enables Python applications to interact with kernel extensions and manage kernel-level operations on macOS. The library is part of the larger PyObjC project, currently at version 12.1, and typically releases updates aligned with macOS SDK changes and Python version support.

pip install pyobjc-framework-kernelmanagement
INSTALL
IMPORT
SIG · PYOBJC-FRAMEWORK-K
P
pyobjc-framework-kernelmanagement
pythonv12.2
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.920 runs
build_error
glibc
py 3.103.920 runs
build_error
Code
Verified usage

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

KMUserClient
from KernelManagement import KMUserClient
NSObject
from Foundation import NSObject
Foundation is a core PyObjC framework often used alongside specific framework bindings.

This quickstart demonstrates importing a class from the KernelManagement framework and verifying its Objective-C type. It also includes a basic interaction with `NSObject` from the core Foundation framework to show general PyObjC functionality. Note that `pyobjc-framework-kernelmanagement` is exclusively for macOS.

import objc from KernelManagement import KMUserClient from Foundation import NSObject # Core PyObjC framework print(f"PyObjC version: {objc.__version__}") # Verify that the KernelManagement framework's classes are accessible # This only works on macOS systems. if objc.platform == 'mac': if hasattr(KMUserClient, 'alloc'): print(f"KMUserClient class found from KernelManagement framework: {KMUserClient}") print(f"Is KMUserClient an Objective-C class? {isinstance(KMUserClient, objc.objc_class)}") else: print("KMUserClient class is available but lacks expected methods (ensure framework is loaded).") # A basic PyObjC interaction demonstrating the bridge with a common class ns_object_instance = NSObject.alloc().init() print(f"Created a basic NSObject instance: {ns_object_instance}") else: print("PyObjC and its framework bindings are macOS-specific and cannot run on this platform.")
Debug
Known issues
breakingPyObjC 12.0 dropped support for Python 3.9, and PyObjC 11.0 dropped support for Python 3.8. Ensure your Python version is 3.10 or newer.
fix
Upgrade Python to version 3.10 or later.
affects: >=11.0
gotchaPyObjC is a binding for macOS's Objective-C frameworks and is therefore exclusively available and functional on macOS. It cannot be used on Windows or Linux.
fix
Ensure your development and deployment environment is macOS. Use platform-specific checks (e.g., `sys.platform == 'darwin'`) if your application needs to be cross-platform.
affects: all
gotchaPyObjC 11.1 introduced changes to align the core bridge with `clang`'s Automatic Reference Counting (ARC) documentation for initializer methods. Methods in the 'init' family now correctly model stealing a reference to `self` and returning a new reference. This can affect manual memory management (though less common in modern ARC code).
fix
Review Objective-C method signatures and expected ARC behavior when dealing with initializer methods, especially if you are bridging custom Objective-C code or older non-ARC patterns.
affects: >=11.1
gotchaPyObjC 10.3 changed the interaction between `__init__` and `__new__` for Python classes bridged to Objective-C. While v10.3.1 partially re-enabled `__init__` when `__new__` is user-implemented, using `__init__` with PyObjC-provided `__new__` is still not supported.
fix
Avoid implementing `__init__` in Python subclasses of Objective-C classes if relying on PyObjC's default `__new__` behavior. If `__new__` is user-implemented, `__init__` can be used. Consult PyObjC documentation for proper class construction patterns.
affects: >=10.3
Upgrade
Version history
12.2latest on PyPI · released May 30, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
pyobjc-framework-kernelmanagement — pip install pyobjc-framework-kernelmanagement · libregistry