apple-platform-py
Apple code signing, notarization, and packaging for Python — anywhere, no
Xcode required. A ctypes SDK over a purpose-built C ABI for
apple-platform-rs (the
rcodesign project), shipped as self-contained wheels.
- Zero Python dependencies (stdlib ctypes; one
py3-none-<platform>wheel covers every CPython ≥ 3.9) - Sign Mach-O binaries (files or in-memory bytes), bundles, DMGs, and XAR installers with p12/PEM/keychain/Windows-store/smartcard/remote keys
- Notarize & staple via Apple's notary service
- Inspect code signatures, bundles, DMGs, and .pkg installers
- Works on macOS, Linux, and Windows
pip install apple-platform-py
Quick start
import apple_platform as ap
# Sign an app bundle with a PKCS#12 certificate
ap.sign(
"MyApp.app",
signer=ap.Signer(p12=ap.P12Key(path="signer.p12", password="secret")),
binary_identifier="com.example.myapp",
for_notarization=True,
)
# Inspect the result
entities = ap.read_signature("MyApp.app")
print(ap.code_directory_identifier(entities))
# Notarize and staple
from apple_platform import notarize
creds = notarize.NotaryCredentials(api_key_path="appstoreconnect-key.json")
submission = notarize.submit("MyApp.app", creds, wait_seconds=600)
notarize.staple("MyApp.app")
More:
# Ad-hoc sign raw Mach-O bytes, no files involved
signed = ap.sign_macho_bytes(macho_bytes, binary_identifier="com.example.tool")
# Per-scope settings (mirrors rcodesign's config file 1:1)
ap.sign(
"MyApp.app",
signer=signer,
paths={
"@main": ap.PathSettings(entitlements_xml_file="app.entitlements"),
"Contents/MacOS/helper": ap.PathSettings(binary_identifier="com.example.helper"),
},
)
# Anything upstream supports that these dataclasses don't model yet:
print(ap.config_schema()) # field names straight from upstream
ap.sign_raw({...}) # verbatim request escape hatch
# Certificates and packaging
cert = ap.certificates.generate_self_signed(person_name="CI") # testing only
info = ap.packaging.pkg_info("Installer.pkg")
ap.packaging.dmg_create("dist/", "MyApp.dmg", volume_label="MyApp")
Errors raise typed exceptions (apple_platform.errors.*) carrying the
native status code, a stable kind label, and the upstream error chain.
Upstream log output is forwarded to the apple_platform.rust logger —
enable with ap.set_log_level("info").
Limitations
| Area | Status |
|---|---|
.pkg creation |
Not supported upstream — inspect/extract/sign only |
dmg_create |
FAT32-backed DMGs (CI/testing utility, not an hdiutil replacement) |
| DMG extraction | Adc/Bzlib/Lzfse chunk codecs unsupported |
verify_macho |
Advisory, per upstream — not Apple's verifier |
| Smartcard signing | Compiled out of released wheels; build sdist with --features smartcard |
| Windows | win_amd64 wheels (no ARM64); windows_store signing is Windows-only, macos_keychain macOS-only |
| Paths | Arbitrary OS bytes for the paths you operate on; signer/settings file paths inside the config must be UTF-8 (upstream's format), and names inside bundles are handled lossily by upstream |
Provenance
apple_platform.versions() reports the exact upstream commit, tag, and
crate versions the native library was built from. The sdist vendors the
complete apple-platform-rs source (MPL-2.0 compliance); see NOTICE.
Wrapper code is Apache-2.0. See MAINTAINING.md for the upstream-update playbook (schema tripwires make pin bumps a one-command-then-review affair).
Metadata
Release files for apple-platform-py 0.1.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 | |
|---|---|---|---|
| apple_platform_py-0.1.0.tar.gz | 3.0 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| apple_platform_py-0.1.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| apple_platform_py-0.1.0-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details |
| apple_platform_py-0.1.0-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details |
| apple_platform_py-0.1.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
Total release size: 40.8 MB
Release files / apple_platform_py-0.1.0.tar.gz
| Download URL | apple_platform_py-0.1.0.tar.gz |
|---|---|
| Size | 3.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f6fdcb4a06a4caa89eecc3e296273bb84028dbd37da69dd231bfdf15fad67dd2
|
|
BLAKE2b-256 checksum How to use checksums |
ffb4570727b83ae0c2b4f99e941dfc1ed5af8bc1175fb994c7992a29f6a4713b
|
| 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 Aug 12, 2026.
Transparency logRelease files / apple_platform_py-0.1.0-py3-none-win_amd64.whl
| Download URL | apple_platform_py-0.1.0-py3-none-win_amd64.whl |
|---|---|
| Size | 8.5 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
1f17b9ac84f552920f03667543236d32c0115232b55a9dc44e6f000b98e436ba
|
|
BLAKE2b-256 checksum How to use checksums |
3651d05f2dff74003e63a546c57cb2e50a8cf630e53af9082e9fe0d1d6506b8d
|
| 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 Aug 12, 2026.
Transparency logRelease files / apple_platform_py-0.1.0-py3-none-manylinux_2_28_x86_64.whl
| Download URL | apple_platform_py-0.1.0-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 10.0 MB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
f020b5c7d35935520477eff92a2d008fc2c80ba86505c3aae0f8841cca4ab406
|
|
BLAKE2b-256 checksum How to use checksums |
a629eaa5abbcff19a4f106a66fd4a9c7dbfb0bc0ffb7adbc69e267e24a18aa33
|
| 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 Aug 12, 2026.
Transparency logRelease files / apple_platform_py-0.1.0-py3-none-manylinux_2_28_aarch64.whl
| Download URL | apple_platform_py-0.1.0-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 10.2 MB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
e58fd33949b1a40140de7f1a179b09310a4c938ef8f12ae205b65895ed687e7b
|
|
BLAKE2b-256 checksum How to use checksums |
0776d9371e244d80d50b09b72439d03b0e30358a2446788558d11628972df422
|
| 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 Aug 12, 2026.
Transparency logRelease files / apple_platform_py-0.1.0-py3-none-macosx_11_0_arm64.whl
| Download URL | apple_platform_py-0.1.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.1 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7bfcea8d9e8067f0fa4f4a13a4c7436eace6817987464b82ac8e34da0ee95cd9
|
|
BLAKE2b-256 checksum How to use checksums |
1d408d644798e95f6ec0ddc484f5864ebac4e4f546820c7a4522f853956699df
|
| 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 Aug 12, 2026.
Transparency log