The PyObjC project aims to provide a bridge between the Python and Objective-C programming languages on macOS. The bridge is intended to be fully bidirectional, allowing the Python programmer to take full advantage of the power provided by various Objective-C based toolkits and the Objective-C programmer transparent access to Python based functionality.
PyObjC not only includes the basic bridge, but also bindings to most Apple frameworks on macOS.
The most important usage of this is writing Cocoa GUI applications on macOS in pure Python. See our tutorial for an example of this.
PyObjC 8.5 was released on 2022-04-19. See the changelog for more information. PyObjC 8 supports Python 3.6 and later.
PyObjC 5.3 is the last version supporting Python 2 and was released on 2019-10-16.
PyObjC supports Python 3.6 or later and does not support Python 2. PyObjC does not support other python implementation such as PyPy and Jython.
PyObjC is regularly tested on macOS 10.14 and should work on macOS 10.9 or later for the i386 and x86_64 architectures.
PyObjC only supports macOS, and is not supported on other platforms (iOS, Linux, …).
- Installing PyObjC
- What’s new in PyObjC
- An introduction to PyObjC
- PyObjC protocol support
- PyObjC support for “blocks”
- PyObjC support for vector/SIMD types
- Converting values between Python and Objective-C
- Support for
- Generated types for C types
- Introspecting PyObjC
- Object-graph serialization
- Key-Value Observing and Python
- PyObjC metadata system
- PyObjC Tutorials
- Exceptions in Cocoa code
- “import Quartz” or “import CoreGraphics”
- Using NSXPCInterface from Python
- Integration with ctypes
- Examples overview
- Overview of macOS frameworks and their wrappers
- Code Signing and Notarizing
- API Notes for PyObjC framework wrappers
- Dealing with API deprecations
- The PyObjC core team
- The release workflow for PyObjC
- Python API
- Context Managers for CoreGraphics
- Utility methods for threading
- API Description for
- API Description for
PyObjC development is hosted at GitHub, in particular at <https://github.com/ronaldoussoren/pyobjc/>.
A low-volume mailinglist for PyObjC development.
A mailing list for anyone developing with Python on macOS.
Creating a checkout of the repository:
$ git clone https://github.com/ronaldoussoren/pyobjc
You can then use the “install.py” at the root of the checkout to install this version of PyObjC.