PyObjC SecurityInterface Framework

12.1 · active · verified Tue Apr 14

This library provides Python wrappers for the `SecurityInterface` framework on macOS, allowing Python applications to integrate with macOS security UI components. It's part of the larger PyObjC project, bridging Python and Objective-C. The current version is 12.1, and releases are frequent, typically aligning with new macOS SDK updates and Python version support changes.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import and instantiate a core class from the `SecurityInterface` framework. For full UI functionality, including displaying windows and handling user input, you would typically integrate this with an `AppKit` application lifecycle.

import objc
from SecurityInterface import SFAuthorizationView

# Instantiate a SecurityInterface UI component
auth_view = SFAuthorizationView.alloc().init()

print(f"Successfully instantiated: {auth_view}")
print(f"Type: {type(auth_view)}")
print(f"Objective-C class: {auth_view.pyobjc_class__}")

# Note: For actual UI display and interaction, you would need
# to initialize an NSApplication and run its event loop (e.g., using AppKit or PyObjCTools.AppHelper).
# This quickstart only demonstrates successful import and instantiation.

view raw JSON →