pymacos
A Pythonic interface to macOS. Notifications, clipboard, dark mode, apps, Keychain, speech and screenshots, all from one import with zero dependencies.
import macos
macos.notify("Build finished", title="CI")
macos.clipboard.copy("hello")
macos.appearance.is_dark() # True
macos.apps.open("Safari") # App(name='Safari', ...)
macos.keychain.get("my-app", "alice") # 's3cret'
macos.say("Done!")
macos.screenshot("screen.png")
Install
pip install pymacos
The package is installed as pymacos and imported as macos.
Requires macOS and Python 3.9+.
Why
Doing any of this from Python usually means shelling out to osascript, remembering defaults keys, or pulling in PyObjC and learning Cocoa. pymacos gives you one small, typed API instead:
- No dependencies. Native features call the system frameworks through
ctypes; the rest wraps tools that ship with every Mac. - Pythonic. Plain functions, dataclasses and real exceptions, not Objective-C selectors or exit codes.
- Safe by default. Your text is never spliced into shell or AppleScript source, and passwords never show up in the process list.
- Helpful errors. A missing privacy permission raises an error that says where to enable it, instead of failing silently.
Documentation
The full guide and API reference are at macos.readthedocs.io.
License
Released under the MIT License — free for personal and commercial use.
Not affiliated with or endorsed by Apple Inc. macOS is a trademark of Apple Inc.
Metadata
Release files for pymacos 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pymacos-1.0.0.tar.gz | 34.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pymacos-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.7 kB
Release files / pymacos-1.0.0.tar.gz
| Download URL | pymacos-1.0.0.tar.gz |
|---|---|
| Size | 34.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c530ac457f0a2642b6369d01d574a3a7b6ec8e710739de2d4c35e3c35c4df47
|
|
BLAKE2b-256 checksum How to use checksums |
671d6aa2ec1b075a6f1e0f1bf97069a4e94087922e0227d4433db0d4b93d2e76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency logRelease files / pymacos-1.0.0-py3-none-any.whl
| Download URL | pymacos-1.0.0-py3-none-any.whl |
|---|---|
| Size | 21.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f21e6070a9c2680812ffa78f4bc99fc41a4437528873cc5ccea49ddd95412e45
|
|
BLAKE2b-256 checksum How to use checksums |
60dc93ddd423f9bf3ab35404a5443c0b5135d9ecaddef19606fd912e6282de60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency log