Sync-first Python API for local macOS Messages and Contacts
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file imessage_wrapper-0.1.0.tar.gz.
File metadata
- Download URL: imessage_wrapper-0.1.0.tar.gz
- Upload date:
- Size: 37.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
287d199d240a92845f57ce4d55f2aaa96b18a9244bd8b9cdaa63a0efa3567dd3
|
|
| MD5 |
2e40e9dfcc2b3e31aac09af96b0ff09b
|
|
| BLAKE2b-256 |
45633253a141501c63373adde30ac333281277460a5c93cfd384c12fa6e6ddf2
|
Provenance
The following attestation bundles were made for imessage_wrapper-0.1.0.tar.gz:
Publisher:
publish.yml on kylevedder/imessage-wrapper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
imessage_wrapper-0.1.0.tar.gz -
Subject digest:
287d199d240a92845f57ce4d55f2aaa96b18a9244bd8b9cdaa63a0efa3567dd3 - Sigstore transparency entry: 1630898157
- Sigstore integration time:
-
Permalink:
kylevedder/imessage-wrapper@94767ffaae0cfb0fc7c827c96881b5d54edf7c6d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kylevedder
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@94767ffaae0cfb0fc7c827c96881b5d54edf7c6d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file imessage_wrapper-0.1.0-py3-none-any.whl.
File metadata
- Download URL: imessage_wrapper-0.1.0-py3-none-any.whl
- Upload date:
- Size: 30.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26542ecf84861a1f06331f2badd1d0a9d2a10dce4ce3126c564a379bd1fa851f
|
|
| MD5 |
89f9e9f53229b4bf190ec03f511a534c
|
|
| BLAKE2b-256 |
93a03ce70a173e1d4872413a52c1c9f172cb9de9278ca3b8693609475c7fdfc3
|
Provenance
The following attestation bundles were made for imessage_wrapper-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on kylevedder/imessage-wrapper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
imessage_wrapper-0.1.0-py3-none-any.whl -
Subject digest:
26542ecf84861a1f06331f2badd1d0a9d2a10dce4ce3126c564a379bd1fa851f - Sigstore transparency entry: 1630898196
- Sigstore integration time:
-
Permalink:
kylevedder/imessage-wrapper@94767ffaae0cfb0fc7c827c96881b5d54edf7c6d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/kylevedder
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@94767ffaae0cfb0fc7c827c96881b5d54edf7c6d -
Trigger Event:
workflow_dispatch
-
Statement type: