Skip to main content

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

  1. Clone the repository:
git clone https://github.com/yourusername/text_imp.git
cd text_imp
  1. Install uv if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. 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:

  1. Make sure you're on macOS (this package only works on macOS)
  2. Reinstall the package:
uv pip uninstall text_imp
uv pip install text_imp
  1. 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

text_imp-0.1.3.tar.gz (35.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

text_imp-0.1.3-cp312-cp312-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file text_imp-0.1.3.tar.gz.

File metadata

  • Download URL: text_imp-0.1.3.tar.gz
  • Upload date:
  • Size: 35.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for text_imp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 447c09204e69a82deb24ebf875046ecb0212ca05e3ab28867eba35a25ecfa8b5
MD5 4691b718704f746c7cbe8ac6d56ab2a8
BLAKE2b-256 acba636bf418a745fde38f2b84636a1e8c7a7b4121e3ae2dfb2a1e861d4217fb

See more details on using hashes here.

File details

Details for the file text_imp-0.1.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for text_imp-0.1.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d80204c1dd4b0eddc2a02a3b261df1d5578709ef3f8c82f94af3c39658e990af
MD5 0c5d1a320bafac806f00286cb4b65e3e
BLAKE2b-256 f4a16cd4c4e11d9c6da6cce3347a7636aa8af1d49db57635983e82340dfd7509

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page