llama-index readers imap integration
Project description
LlamaIndex Readers Integration: IMAP
Overview
Simple IMAP reader allows loading emails from a given mailbox. It concatenates useful fields from each email into a single document used by LlamaIndex.
Installation
pip install llama-index-readers-imap
Usage
from llama_index.readers.imap import ImapReader
# Initialize the server
mailbox = ImapReader(
host="<MAIL HOST>",
username="<MAIL USERNAME>",
password="<MAIL PASSWORD>",
)
# Lazy load emails from the given mailbox
emails = mailbox.lazy_load_data(
folder="INBOX", # Customize the folder to read from
metadata_names=[
"uid",
"from_values"
], # Customize the metadata (date is always included). You can get the full list at https://pypi.org/project/imap-tools/#email-attributes
search_criteria=None, # By default all emails are read, customize the query following https://pypi.org/project/imap-tools/#search-criteria
)
This loader is designed to be used as a way to load data into LlamaIndex.
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 llama_index_readers_imap-0.1.0.tar.gz.
File metadata
- Download URL: llama_index_readers_imap-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbadbfa14174de3ee59a3fcab36bab4135ff6bf9feef055c89160707fee54a69
|
|
| MD5 |
f1064da466840e5f7461f017c1367c48
|
|
| BLAKE2b-256 |
5367bb1bfcc38df1c3fb5c8faa36d62eaffdb3c9ad52c48ff5cdcd41628470ef
|
File details
Details for the file llama_index_readers_imap-0.1.0-py3-none-any.whl.
File metadata
- Download URL: llama_index_readers_imap-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bd1d7d7ec5450f2a12795612be7dab6e360674b682327ef1ba54fe10d1a9c6e
|
|
| MD5 |
dd32dd946c4a08d070897973951df542
|
|
| BLAKE2b-256 |
3e377960bfad9e76dec6be10b09261adad1d1bd7089f1b75b8c63e632ff1d779
|