Registry / auth-security / pyobjc-framework-cryptotokenkit

pyobjc-framework-cryptotokenkit

JSON →
library12.2pypypiunverified

PyObjC is a comprehensive bridge between Python and Objective-C, enabling the development of full-featured Cocoa applications entirely in Python. This specific package provides Python wrappers for Apple's CryptoTokenKit framework on macOS, allowing Python applications to interact with cryptographic tokens like smart cards and Hardware Security Modules (HSMs). The current version is 12.1, with releases typically aligning with macOS SDK updates and Python version support.

pip install pyobjc-framework-cryptotokenkit
INSTALL
IMPORT
SIG · PYOBJC-FRAMEWORK-C
P
pyobjc-framework-cryptotokenkit
auth-securitypythonv12.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.

CryptoTokenKit
import CryptoTokenKit
Framework bindings are accessed directly by importing the framework name as a Python package.
TKTokenDriver
from CryptoTokenKit import TKTokenDriver
Classes within the framework are accessed as attributes of the imported framework module.

This quickstart demonstrates how to import the `CryptoTokenKit` framework and access one of its core classes, `TKTokenDriver`. While many classes in `CryptoTokenKit` are meant to be used within macOS app extensions for cryptographic token management, this snippet validates that the PyObjC bindings are correctly installed and accessible.

import CryptoTokenKit # Accessing a class from the CryptoTokenKit framework # Note: Instantiating many CryptoTokenKit classes directly in a script # without being a proper macOS token extension might not be meaningful. # This example primarily demonstrates successful import and class access. token_driver_class = CryptoTokenKit.TKTokenDriver print(f"Successfully imported CryptoTokenKit.") print(f"TKTokenDriver is a: {type(token_driver_class)}") print(f"Name of the TKTokenDriver class: {token_driver_class.__name__}") # Example of attempting to access a class method (if available) # (This specific call might not be functional without a running token service) # if hasattr(token_driver_class, 'driverExtensionPointForIdentifier_'): # print(f"TKTokenDriver has driverExtensionPointForIdentifier_ method.")
Debug
Known issues
breakingPyObjC 12.0 dropped support for Python 3.9. Users on Python 3.9 must use an older version of PyObjC.
fix
Upgrade to Python 3.10 or later, or pin `pyobjc-framework-cryptotokenkit` to `<12.0`.
affects: >=12.0
breakingPyObjC 11.0 dropped support for Python 3.8. Users on Python 3.8 must use an older version of PyObjC.
fix
Upgrade to Python 3.9 or later, or pin `pyobjc-framework-cryptotokenkit` to `<11.0`.
affects: >=11.0
gotchaPyObjC 11.1 aligned its behavior for Objective-C 'init' family methods with `clang`'s automatic reference counting documentation. This means that methods in the 'init' family now correctly steal a reference to `self` and return a new reference, which may affect custom initializers written in Python.
fix
Review Python implementations of Objective-C 'init' methods to ensure correct reference counting, especially if manual memory management was previously assumed or if issues with object lifecycle occur.
affects: >=11.1
gotchaThe interaction between Python's `__init__` and `__new__` methods changed in PyObjC 10.3, where `__init__` could not be used with PyObjC-provided `__new__`. A partial reintroduction in v10.3.1 allowed `__init__` when a user implements `__new__`, but not when relying on PyObjC's `__new__`.
fix
If encountering issues with object initialization, especially when subclassing Objective-C classes in Python and using custom `__new__` or `__init__`, consult the 10.3.1 release notes and adapt your object creation pattern.
affects: 10.3, 10.3.1
gotchaWhile PyObjC 11.0 and 10.3 include experimental support for free-threading (PEP 703) introduced in Python 3.13, it does not fully support this feature. Users should be aware of potential limitations or issues when running PyObjC with a free-threaded Python interpreter.
fix
Avoid using PyObjC in contexts that heavily rely on Python's experimental free-threading, or thoroughly test your application in such environments and report any issues.
affects: >=10.3 (with Python 3.13+)
deprecated`objc.ObjCLazyModule` is deprecated. The lazy loading mechanism now defaults to using module-level `__dir__` and `__getattr__`. This changes how attributes are accessed and ensures private symbols from dependencies are no longer implicitly imported.
fix
Update code that relies on `objc.ObjCLazyModule` or expects `objc` as an attribute of framework binding packages. Access symbols directly from the framework package (e.g., `Foundation.NSString` instead of `Foundation.objc.NSString`).
affects: >=10.0
Upgrade
Version history
12.2latest on PyPI · released May 30, 2026
Audit
Dependencies
pyobjc-corerequiredThis package provides the core bridging functionality between Python and Objective-C, essential for all PyObjC framework wrappers.
Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
2
Resources
pyobjc-framework-cryptotokenkit — pip install pyobjc-framework-cryptotokenkit · libregistry