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.4.tar.gz (22.8 kB view details)

Uploaded Source

Built Distributions

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

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

Uploaded CPython 3.12macOS 11.0+ ARM64

text_imp-0.1.4-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (6.8 MB view details)

Uploaded CPython 3.12macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for text_imp-0.1.4.tar.gz
Algorithm Hash digest
SHA256 38dd3544b79e6931424c5456a7950e2ce34516b7adffe613ccf9ac6383ce18ca
MD5 7e42e5765faab59df76e43739f68ba82
BLAKE2b-256 8217f3ee12de663464e5a8829e13543150cf153eb991c978524c030e697cc54f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for text_imp-0.1.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 77c6d5ce91c8bb2ed21e94c0000d316e9af1164f913ddb511cd78062cdb8858a
MD5 f9e0c66471d8b845966e2ff911259dc3
BLAKE2b-256 2f7f41652146e7a51904c1851d5b9efff8e4c6382cc8487d0485999b1488a6a8

See more details on using hashes here.

File details

Details for the file text_imp-0.1.4-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for text_imp-0.1.4-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 ed75be5380e26ee2dfa7ba39081a7baebbcde2bac0a452b502e8528a3151a833
MD5 0852dba0a00bd62423b1020f33bf77a3
BLAKE2b-256 b121bd3144a37bc0b1eba000175606208f63d5734a38938fdc423b0da4bd8092

See more details on using hashes here.

Provenance

The following attestation bundles were made for text_imp-0.1.4-cp312-cp312-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: publish.yml on aglucky/text_imp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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