PyObjC

PyObjC provides bindings to most Objective-C frameworks on macOS, build upon a generic bidirectional bridge between Python and Objective-C.

PyObjC aims to get as close as possible to having Python and a first class language for developing applications and scripts on macOS using Apple’s high level system APIs.

Cocoa class definition in Python
from Foundation import NSObject
from objc import super

class MyCocoaObject(NSObject):
    def initWithX_y_(self, x, y):
        self = super().init()
        if self is None:
            return None
        self.x = x
        self.y = y
        return self
Release Info

PyObjC 11.0 was released on 2025-01-14. See the changelog for more information.

What’s new in PyObjC
Supported Platforms
  • macOS 10.9 and later

  • Python 3.9 and later

  • x86_64 and arm64

Supported platforms
Installing PyObjC
$ python3 -mpip \
  install -U pyobjc
Installing PyObjC