Name | text_imp JSON |
Version |
0.2.0.1
JSON |
| download |
home_page | None |
Summary | Python bindings for iMessage and Contacts database access |
upload_time | 2025-08-03 19:08:02 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT |
keywords |
imessage
contacts
macos
database
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Text Imp
Python bindings for iMessage and Contacts database access. Requires MacOS and full file system access to run.
## Requirements
- Python >= 3.8
- macOS (for iMessage database access)
- [uv](https://github.com/astral-sh/uv) package manager (recommended) or pip
## Installation
This package requires Python 3.8 or later. We recommend using [uv](https://github.com/astral-sh/uv) for package management.
### Using uv (Recommended)
```bash
uv pip install text_imp
```
### Using pip
```bash
pip install text_imp
```
## Development Setup
1. Clone the repository:
```bash
git clone https://github.com/yourusername/text_imp.git
cd text_imp
```
2. Install uv if you haven't already:
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
3. Create a virtual environment and install dependencies:
```bash
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
```python
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)
# To join with messages table, use guid version of
# attachments with message guid
attachments_with_id = get_attachments_with_guid()
print(attachments_with_id)
# Get chats
chats = text_imp.get_chats()
print(chats)
# Get handles
handles = text_imp.get_handles()
print(handles)
# Get chat handles
chat_handles = text_imp.get_chat_handles()
print(handles)
```
## Example Data
Each function returns a Polars DataFrame with structured data. Here are examples of what the returned data looks like:
### Messages DataFrame
**Columns:** `date, text, is_from_me, handle_id, chat_id, guid, thread_originator_guid, thread_originator_part, service_type, variant, expressive, announcement_type, num_attachments, is_deleted, group_title, is_edited, is_tapback, is_reply, num_replies, date_delivered, date_read, is_url, has_replies, body`

### Contacts DataFrame
**Columns:** `contact_id, first_name, last_name, state, city, normalized_contact_id`

### Attachments DataFrame
**Columns:** `rowid, filename, uti, mime_type, transfer_name, emoji_description, is_sticker, path, extension, display_filename, file_size`

### Chats DataFrame
**Columns:** `rowid, chat_identifier, service_name, display_name, name, resolved_display_name`

### Handles DataFrame
**Columns:** `rowid, id, person_centric_id`

### Chat Handles DataFrame
**Columns:** `chat_id, handle_id`

## Project Structure
```txt
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:
```bash
# 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:
```bash
uv pip uninstall text_imp
uv pip install text_imp
```
3. If installing from source, rebuild the package:
```bash
uv pip install -e .
```
Raw data
{
"_id": null,
"home_page": null,
"name": "text_imp",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "imessage, contacts, macos, database",
"author": null,
"author_email": "Adam Gluck <contact@adamgluck.com>",
"download_url": "https://files.pythonhosted.org/packages/0e/ba/e7c2dc981f6a43bd048bb6533ac81d1ca4c794513713a4032a65cc6dfcca/text_imp-0.2.0.1.tar.gz",
"platform": null,
"description": "# Text Imp\n\nPython bindings for iMessage and Contacts database access. Requires MacOS and full file system access to run.\n\n## Requirements\n\n- Python >= 3.8\n- macOS (for iMessage database access)\n- [uv](https://github.com/astral-sh/uv) package manager (recommended) or pip\n\n## Installation\n\nThis package requires Python 3.8 or later. We recommend using [uv](https://github.com/astral-sh/uv) for package management.\n\n### Using uv (Recommended)\n\n```bash\nuv pip install text_imp\n```\n\n### Using pip\n\n```bash\npip install text_imp\n```\n\n## Development Setup\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/yourusername/text_imp.git\ncd text_imp\n```\n\n2. Install uv if you haven't already:\n```bash\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n```\n\n3. Create a virtual environment and install dependencies:\n```bash\nuv venv\nsource .venv/bin/activate # On Unix/macOS\n# or\n.venv\\Scripts\\activate # On Windows\n\n# Install the package in editable mode with all dependencies\nuv pip install -e .\n```\n\n## Usage Example\n\n```python\nimport text_imp\n\n# Get messages\nmessages = text_imp.get_messages()\nprint(messages)\n\n# Get contacts\ncontacts = text_imp.get_contacts()\nprint(contacts)\n\n# Get attachments\nattachments = text_imp.get_attachments()\nprint(attachments)\n\n# To join with messages table, use guid version of\n# attachments with message guid\nattachments_with_id = get_attachments_with_guid()\nprint(attachments_with_id)\n\n# Get chats\nchats = text_imp.get_chats()\nprint(chats)\n\n# Get handles\nhandles = text_imp.get_handles()\nprint(handles)\n\n# Get chat handles\nchat_handles = text_imp.get_chat_handles()\nprint(handles)\n```\n\n## Example Data\n\nEach function returns a Polars DataFrame with structured data. Here are examples of what the returned data looks like:\n\n### Messages DataFrame\n\n**Columns:** `date, text, is_from_me, handle_id, chat_id, guid, thread_originator_guid, thread_originator_part, service_type, variant, expressive, announcement_type, num_attachments, is_deleted, group_title, is_edited, is_tapback, is_reply, num_replies, date_delivered, date_read, is_url, has_replies, body`\n\n\n\n### Contacts DataFrame\n\n**Columns:** `contact_id, first_name, last_name, state, city, normalized_contact_id`\n\n\n\n### Attachments DataFrame\n\n**Columns:** `rowid, filename, uti, mime_type, transfer_name, emoji_description, is_sticker, path, extension, display_filename, file_size`\n\n\n\n### Chats DataFrame\n\n**Columns:** `rowid, chat_identifier, service_name, display_name, name, resolved_display_name`\n\n\n\n### Handles DataFrame\n\n**Columns:** `rowid, id, person_centric_id`\n\n\n\n### Chat Handles DataFrame\n\n**Columns:** `chat_id, handle_id`\n\n\n\n## Project Structure\n\n```txt\ntext_imp/\n\u251c\u2500\u2500 src/ # Rust source code\n\u251c\u2500\u2500 text_imp/ # Python package directory\n\u251c\u2500\u2500 examples/ # Usage examples\n\u251c\u2500\u2500 tests/ # Test files\n\u251c\u2500\u2500 Cargo.toml # Rust dependencies and configuration\n\u2514\u2500\u2500 pyproject.toml # Python package configuration\n```\n\n## Building from Source\n\nThe package uses Maturin for building the Rust extensions. To build from source:\n\n```bash\n# Using uv\nuv pip install -e .\n\n# Or verify the installation\nuv run --with text_imp --no-project -- python -c \"import text_imp\"\n```\n\n## Troubleshooting\n\nIf you encounter the error `AttributeError: module 'text_imp' has no attribute 'get_messages'`, try the following:\n\n1. Make sure you're on macOS (this package only works on macOS)\n2. Reinstall the package:\n```bash\nuv pip uninstall text_imp\nuv pip install text_imp\n```\n\n3. If installing from source, rebuild the package:\n```bash\nuv pip install -e .\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python bindings for iMessage and Contacts database access",
"version": "0.2.0.1",
"project_urls": {
"Homepage": "https://github.com/adamgluck/text_imp"
},
"split_keywords": [
"imessage",
" contacts",
" macos",
" database"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "0ebae7c2dc981f6a43bd048bb6533ac81d1ca4c794513713a4032a65cc6dfcca",
"md5": "c79854244964fabb79b50ea5b3092719",
"sha256": "da9eab5d6419fc1e4fcb31f4c0f713ac17c1cb2277fdaa90fa1077c4f287d57b"
},
"downloads": -1,
"filename": "text_imp-0.2.0.1.tar.gz",
"has_sig": false,
"md5_digest": "c79854244964fabb79b50ea5b3092719",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 1481416,
"upload_time": "2025-08-03T19:08:02",
"upload_time_iso_8601": "2025-08-03T19:08:02.706174Z",
"url": "https://files.pythonhosted.org/packages/0e/ba/e7c2dc981f6a43bd048bb6533ac81d1ca4c794513713a4032a65cc6dfcca/text_imp-0.2.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-03 19:08:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "adamgluck",
"github_project": "text_imp",
"github_not_found": true,
"lcname": "text_imp"
}