Python bindings for iMessage and Contacts database access
Project description
Text Imp
Python bindings for iMessage and Contacts database access.
Requirements
- Python >= 3.8
- macOS (for iMessage database access)
- uv package manager (recommended) or pip
Installation
This package requires Python 3.8 or later. We recommend using uv for package management.
Using uv (Recommended)
uv pip install text_imp
Using pip
pip install text_imp
Development Setup
- Clone the repository:
git clone https://github.com/yourusername/text_imp.git
cd text_imp
- Install uv if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | sh
- Create a virtual environment and install dependencies:
uv venv
source .venv/bin/activate # On Unix/macOS
# or
.venv\Scripts\activate # On Windows
# Install the package in editable mode with all dependencies
uv pip install -e .
Usage Example
import text_imp
# Get messages
messages = text_imp.get_messages()
print(messages)
# Get contacts
contacts = text_imp.get_contacts()
print(contacts)
# Get attachments
attachments = text_imp.get_attachments()
print(attachments)
# Get chats
chats = text_imp.get_chats()
print(chats)
# Get chat handles
handles = text_imp.get_chat_handles()
print(handles)
Project Structure
text_imp/
├── src/ # Rust source code
├── text_imp/ # Python package directory
├── examples/ # Usage examples
├── tests/ # Test files
├── Cargo.toml # Rust dependencies and configuration
└── pyproject.toml # Python package configuration
Building from Source
The package uses Maturin for building the Rust extensions. To build from source:
# Using uv
uv pip install -e .
# Or verify the installation
uv run --with text_imp --no-project -- python -c "import text_imp"
Troubleshooting
If you encounter the error AttributeError: module 'text_imp' has no attribute 'get_messages', try the following:
- Make sure you're on macOS (this package only works on macOS)
- Reinstall the package:
uv pip uninstall text_imp
uv pip install text_imp
- If installing from source, rebuild the package:
uv pip install -e .
License
MIT License - see LICENSE file for details.
Project details
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 text_imp-0.1.2.tar.gz.
File metadata
- Download URL: text_imp-0.1.2.tar.gz
- Upload date:
- Size: 35.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e17a0978b2dc6d324de0a648762f3a9d23975e75d9871f066e1c7f82b2287e32
|
|
| MD5 |
ab62829eacd48efdd01c90c27eb58b3a
|
|
| BLAKE2b-256 |
c349acc13536df919bb0cb4c4cf23eb70145b96b8513af8f63584877ffe5cce3
|
File details
Details for the file text_imp-0.1.2-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: text_imp-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83509029c5616316b3b16045423dc5f1ee5403a69b9d1260ed0ba3200adb1d90
|
|
| MD5 |
e36461dd643daeb6fe014f63269e15ed
|
|
| BLAKE2b-256 |
63754454fee14402ec9fde005faee1fa306a930b335812c28a85dcf478dc827a
|