semvec/pypi-packages huggingface dataset:
llama-index-readers-imap 0.2.3
llama-index readers imap integration
Requires Python: <4.0,>=3.9

# 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

```python
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
    save_attachment=None,  # Callback function to save attachments
)
```

## Saving attachments

The `lazy_load_data` function accepts an optional `save_attachment` callback function which, if defined, is called for every attachment in the email.

Its only parameter is an `imap_tools.MailAttachment` which is described in the [official documentation](https://pypi.org/project/imap-tools/#email-attributes). It must return the path of the saved attachment as a string. Every saved attachment will be added to the Document metadata with its saved filename and the original one.

Here's a simple example of the `save_attachment` function:

```python
import imap_tools


def save_attachment(attachment: imap_tools.MailAttachment) -> str:
    with open(f"attachments/custom_filename", "wb") as f:
        f.write(attachment.payload)
    return "attachments/custom_filename"
```

---

This loader is designed to be used as a way to load data into [LlamaIndex](https://github.com/run-llama/llama_index/tree/main/llama_index).
llama-diff 0.1.1
AI-powered code review for git diffs
Requires Python: >=3.9
Keywords: git, code-review, llm, ai, diff

# LlamaDiff

A Python-based code review tool that analyzes git diffs between branches using LLMs.

## License

Licensed under the Apache License, Version 2.0.

## Features

- Compare any two git branches and get AI-powered code review
- Supports multiple LLM providers via litellm:
  - **Ollama** (local, default)
  - **OpenAI** (GPT-4, GPT-4o, etc.)
  - **Anthropic** (Claude)
  - **OpenRouter** (access to many models)

## Installation

### Via pipx (recommended)

```bash
# Run directly without installing
pipx run llama-diff -s feature -t main

# Or install globally
pipx install llama-diff
```

### Via pip

```bash
pip install llama-diff
```

### From source

```bash
git clone https://github.com/ernestp/LlamaDiff.git
cd LlamaDiff
pip install -e .
```

## Configuration

Copy `.env.example` to `.env` and configure your preferred provider:

```bash
cp .env.example .env
```

## Usage

```bash
# Basic usage (compare current branch to main)
llama-diff --source feature-branch --target main

# Using a specific model
llama-diff -s feature -t main --model ollama/codellama

# Using OpenAI
llama-diff -s feature -t main --model gpt-4o

# Review specific files only
llama-diff -s feature -t main --files "*.py"

# Output to file
llama-diff -s feature -t main --output review.md

# Interactive HTML review
llama-diff -s feature -t main --html

# Review uncommitted changes
llama-diff --uncommitted
```

## Model Examples

| Provider | Model Example |
|----------|---------------|
| Ollama | `ollama/llama3.2`, `ollama/codellama` |
| OpenAI | `gpt-5.2`, `gpt-5.1`, `gpt-4o`, `gpt-4o-mini` |
| Anthropic | `claude-sonnet-4.5`, `claude-opus-4.5` |
| OpenRouter | `openrouter/anthropic/claude-sonnet-4.5`, `openrouter/anthropic/claude-opus-4.5` |
aidefense-cli 0.1.0
AI导论编程题的出题与答辩命令行工具（默认 Moonshot/Kimi）
Requires Python: >=3.9
Keywords: llm, cli, education, moonshot, kimi

# aidefense-cli

AI 导论编程题出题与答辩命令行工具（默认 Moonshot/Kimi）。

## Install

From PyPI (after publish):

```bash
python -m pip install aidefense-cli
```

Editable (for development):

```bash
python -m pip install -e .
```

## Quick start

Set env vars (recommended):

```bash
set AIDEF_API_KEY=sk-...
set AIDEF_API_BASE=https://api.moonshot.cn/v1
set AIDEF_MODEL=moonshot-v1-8k
```

Start REPL:

```bash
aidef
```

Inside REPL:

- `gen` 生成题目（会要求输入：主题/题型/难度）
- `code paste` 粘贴学生代码（以单独一行 `EOF` 结束）
- `output paste` 粘贴运行输出（以单独一行 `EOF` 结束）
- `defend` 发起答辩（只问 1 个深入问题）
- `say 你的回复...` 继续多轮答辩
- `export md record.md` 导出 Markdown 记录