Access Objective-C classes from Python
Go to file
Julian c30a8425d3
Create `no-reponse.yml` (#106)
2023-11-10 08:33:27 +01:00
.github/workflows Create `no-reponse.yml` (#106) 2023-11-10 08:33:27 +01:00
docs Add (now mandatory) .readthedocs.yaml file, add docs requirements.txt and update sphinx conf (#103) 2023-10-20 18:32:00 +02: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 version to 1.2.4.dev0 (#104) 2023-10-20 19:19:07 +02:00
tests Merge pull request #66 from Mulugruntz/fix-objcarr-crash-if-empty 2020-10-20 15:19:10 -04:00
tools
.gitignore
.readthedocs.yaml Add (now mandatory) .readthedocs.yaml file, add docs requirements.txt and update sphinx conf (#103) 2023-10-20 18:32:00 +02:00
LICENSE
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 Add Discord and remove IRC from support channels (#94) 2023-05-13 11:30:35 +02:00
pyproject.toml
setup.py Fixes the build on kivy-ios, as we do not have access to Cython (#101) 2023-10-15 14:22:35 +02: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 a Discord server:

https://chat.kivy.org/

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]