Skip to main content

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

llama_index_readers_imap-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

llama_index_readers_imap-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_readers_imap-0.1.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_imap-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dbadbfa14174de3ee59a3fcab36bab4135ff6bf9feef055c89160707fee54a69
MD5 f1064da466840e5f7461f017c1367c48
BLAKE2b-256 5367bb1bfcc38df1c3fb5c8faa36d62eaffdb3c9ad52c48ff5cdcd41628470ef

See more details on using hashes here.

File details

Details for the file llama_index_readers_imap-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_imap-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9bd1d7d7ec5450f2a12795612be7dab6e360674b682327ef1ba54fe10d1a9c6e
MD5 dd32dd946c4a08d070897973951df542
BLAKE2b-256 3e377960bfad9e76dec6be10b09261adad1d1bd7089f1b75b8c63e632ff1d779

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