PyObjC FSKit Framework

12.1 · active · verified Tue Apr 14

This library provides Python wrappers for the macOS FSKit framework, which is primarily used for developing Finder Sync extensions. It allows Python applications to interact with Finder's UI and filesystem events. The current version is 12.1, and releases typically follow macOS SDK updates, aligning with Apple's development cycles.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import the `FSKit` framework and access one of its core classes, `FSKExtension`. Note that fully utilizing FSKit requires creating and registering a Finder Sync Extension within a macOS application bundle, which is a more complex setup not covered in this minimal example.

import FSKit
import objc # Required for objc.lookUpClass

# FSKit is primarily designed for creating Finder Sync extensions on macOS.
# A full functional example requires registering an extension with macOS,
# which is beyond a simple quickstart. This code demonstrates loading
# the framework and accessing a core class.

# Access a known class from the FSKit framework, e.g., FSKExtension
# FSKExtension is the base class for implementing Finder Sync extensions.
FSKExtension_Class = FSKit.FSKExtension

print(f"FSKit module loaded: {FSKit}")
print(f"FSKExtension class type: {type(FSKExtension_Class)}")
print(f"FSKExtension inherits from NSObject: {issubclass(FSKExtension_Class, objc.lookUpClass('NSObject'))}")

# To actually use FSKit, you would typically subclass FSKExtension, implement
# its methods, and configure your macOS application's Info.plist to register
# it as a Finder Sync extension. This process requires Xcode and specific
# application bundling and is not shown here.

view raw JSON →