Skip to main content

pymdm

A Python utility package for macOS MDM deployment scripts, built for MacAdmins Python (#!/usr/local/bin/managed_python3) and Jamf Pro workflows. Windows/Intune support is included for teams managing mixed-platform fleets.

📖 Full documentation →

What's Included

Feature macOS (Jamf) Windows (Intune)
JamfParamParser Yes --
IntuneParamParser -- Yes
GenericParamParser Yes Yes
Dialog (swiftDialog) Yes Graceful no-op
CommandRunner Yes Yes
TextTools Yes Yes
SystemInfo Yes Yes
MdmLogger Yes Yes
WebhookSender Yes Yes
DarwinDefaults Yes --
DarwinServiceManager Yes --
Win32Registry -- Yes
Win32ServiceManager -- Yes

See the User Guide for what each piece does.

Installation

pip install pymdm[requests]

requests is an optional extra because the primary target, MacAdmins managed_python3, already bundles it, so a plain pip install pymdm is enough there. The uv, source, and fleet-deployment paths are in the installation guide.

Quick Example (macOS / Jamf Pro)

#!/usr/local/bin/managed_python3
"""Example Jamf Pro policy script."""

from pymdm import MdmLogger, CommandRunner, SystemInfo, WebhookSender
from pymdm.mdm import get_provider

params = get_provider("jamf")    # explicit; get_provider() now defaults to GenericParamParser
logger = MdmLogger(debug=params.get_bool(4), output_path="/var/log/my_script.log")
runner = CommandRunner(logger=logger)
logger.log_startup("my_script", version="1.0.0")

try:
    serial = SystemInfo.get_serial_number()
    hostname = SystemInfo.get_hostname()
    logger.info(f"Running on {hostname} ({serial})")

    output = runner.run(["/usr/bin/sw_vers", "-productVersion"])
    logger.info(f"macOS version: {output}")

    webhook = WebhookSender(url=params.get(5), logger=logger)
    webhook.send(hostname=hostname, serial=serial, status="success")
except Exception as e:
    logger.log_exception("Script failed", e, exit_code=1)

Windows/Intune, platform helpers, and per-module usage live in the Quick Start.

Development

git clone https://github.com/liquidz00/pymdm.git
cd pymdm
make install-dev   # dev dependencies (includes docs tooling)
make test
make format
make help          # list every target

See CONTRIBUTING to get started, and the CHANGELOG for release notes and version migration steps.

Requirements

License

Apache 2.0

Metadata

Release files for pymdm 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymdm 0.7.0
File Size Uploaded
pymdm-0.7.0.tar.gz 52.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pymdm 0.7.0
File Interpreter ABI Platform
pymdm-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 92.7 kB

Release files / pymdm-0.7.0.tar.gz

Download URL pymdm-0.7.0.tar.gz
Size 52.6 kB
Tags Source
SHA-256 checksum
How to use checksums
32174b2bae34f9ad9be216d64f60d96b67dea3d2d463a8701f9e649c2c4ac082
BLAKE2b-256 checksum
How to use checksums
a451051febb89c6adaba952d68f7547b62d5163d1ce872039c87691f57656011
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jun 29, 2026.

Transparency log

Release files / pymdm-0.7.0-py3-none-any.whl

Download URL pymdm-0.7.0-py3-none-any.whl
Size 40.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eee7131abf7d87b532304d0471c71bea27e5fc202af31cd87928edf99b89200b
BLAKE2b-256 checksum
How to use checksums
0247238af5eecb738d073ee4efdce74d65adeee5490d4eca229def0d657329dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Jun 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page