Skip to main content

imessage-wrapper

imessage-wrapper is a sync-first Python package for reading local macOS Messages history, enriching it with macOS Contacts, sending through Messages.app, and creating/updating Contacts records through Apple's Contacts framework.

Install

pip install imessage-wrapper

Install the optional Contacts write dependency on macOS with:

pip install "imessage-wrapper[contacts]"

Usage

from imessage_wrapper import IMessageClient

client = IMessageClient()

for chat in client.chats(limit=10):
    print(chat.id, chat.name, chat.last_message_at)

messages = client.messages(chat_id=chat.id, limit=50, attachments=True)
client.send(chat_id=chat.id, text="hello")

Permissions

Reads require Full Disk Access for the Python process so it can open ~/Library/Messages/chat.db and the AddressBook databases. Sending requires Automation permission to control Messages.app. Contact writes require Contacts permission and the pyobjc-framework-Contacts dependency on macOS.

The package reads Messages and AddressBook SQLite databases in read-only mode. It never writes those databases directly.

Metadata

Release files for imessage-wrapper 0.1.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 imessage-wrapper 0.1.0
File Size Uploaded Provenance Actions
imessage_wrapper-0.1.0.tar.gz 37.4 kB With provenance Details for imessage_wrapper-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for imessage-wrapper 0.1.0
File Interpreter ABI Platform Actions
imessage_wrapper-0.1.0-py3-none-any.whl Python 3 none any Details for imessage_wrapper-0.1.0-py3-none-any.whl

Total release size: 67.6 kB

Release files / imessage_wrapper-0.1.0.tar.gz

Download URL imessage_wrapper-0.1.0.tar.gz
Size 37.4 kB
Tags Source
SHA-256 checksum
How to use checksums
287d199d240a92845f57ce4d55f2aaa96b18a9244bd8b9cdaa63a0efa3567dd3
BLAKE2b-256 checksum
How to use checksums
45633253a141501c63373adde30ac333281277460a5c93cfd384c12fa6e6ddf2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 25, 2026.

Transparency log

Release files / imessage_wrapper-0.1.0-py3-none-any.whl

Download URL imessage_wrapper-0.1.0-py3-none-any.whl
Size 30.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26542ecf84861a1f06331f2badd1d0a9d2a10dce4ce3126c564a379bd1fa851f
BLAKE2b-256 checksum
How to use checksums
93a03ce70a173e1d4872413a52c1c9f172cb9de9278ca3b8693609475c7fdfc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 25, 2026.

Transparency log

Security for imessage-wrapper 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for imessage_wrapper-0.1.0.tar.gz

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 May 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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