Access Objective-C classes from Python
Go to file
Mirko Galimberti 9c0ca61c0c
Our self-hosted Apple Silicon runner now has been migrated to actions/runner v2.292.0 which now supports arm64 natively (#87)
2022-05-25 20:40:02 +02:00
.ci Improved Apple Silicon support (variadic functions) + add tests on apple-silicon-m1 (self hosted runner) (#85) 2022-03-26 13:57:26 +01:00
.github/workflows Our self-hosted Apple Silicon runner now has been migrated to actions/runner v2.292.0 which now supports arm64 natively (#87) 2022-05-25 20:40:02 +02:00
docs docs: Fix a few typos (#83) 2021-12-26 09:44:16 +01:00
examples docs: Fix a few typos (#83) 2021-12-26 09:44:16 +01:00
objc_classes Improved Apple Silicon support (variadic functions) + add tests on apple-silicon-m1 (self hosted runner) (#85) 2022-03-26 13:57:26 +01:00
pyobjus Bump to 1.2.2.dev0. 2022-03-26 14:41:58 -04:00
tests Merge pull request #66 from Mulugruntz/fix-objcarr-crash-if-empty 2020-10-20 15:19:10 -04:00
tools fix protocol parsing and update protocols 2016-04-10 15:31:24 -05:00
.gitignore enhance setup and Makefile to not force compilation of pyobjus, only use depends changes. 2014-02-06 18:19:35 +01:00
LICENSE Update copyright year 2017-08-11 21:38:21 +02:00
MANIFEST.in Switch to GitHub actions with automatic deployment (#71) 2020-11-04 20:45:58 -05:00
Makefile Improved Apple Silicon support (variadic functions) + add tests on apple-silicon-m1 (self hosted runner) (#85) 2022-03-26 13:57:26 +01:00
README.md Update README.md to add opencollective 2019-02-05 11:05:27 +01:00
pyproject.toml Add pyproject.toml (#69) 2020-09-05 16:52:17 -04:00
setup.py Build wheels for pyobjus (#84) 2022-03-18 19:52:20 -04:00

README.md

Pyobjus

Python module for accessing Objective-C classes as Python classes using Objective-C runtime reflection.

Build Status Backers on Open Collective Sponsors on Open Collective

Quick overview


from pyobjus import autoclass, objc_str
from pyobjus.dylib_manager import load_framework, INCLUDE

# load AppKit framework into pyojbus
load_framework(INCLUDE.AppKit)

# get nsalert class
NSAlert = autoclass('NSAlert')

# create an NSAlert object, and show it.
alert = NSAlert.alloc().init()
alert.setMessageText_(objc_str('Hello world!'))
alert.runModal()

Support

If you need assistance, you can ask for help on our mailing list:

We also have an IRC channel:

  • Server : irc.freenode.net
  • Port : 6667, 6697 (SSL only)
  • Channel : #kivy

Contributing

We love pull requests and discussing novel ideas. Check out our contribution guide and feel free to improve Pyobjus.

The following mailing list and IRC channel are used exclusively for discussions about developing the Kivy framework and its sister projects:

Discord channel:

License

Pyobjus is released under the terms of the MIT License. Please refer to the LICENSE file.

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]