Metadata-Version: 2.4
Name: open-batch-llm
Version: 0.1.0
Summary: A CLI tool to manage batch LLM calls
Project-URL: Homepage, https://github.com/dev-ankit/open-batch-llm
Project-URL: Repository, https://github.com/dev-ankit/open-batch-llm
Project-URL: Issues, https://github.com/dev-ankit/open-batch-llm/issues
License: MIT License
        
        Copyright (c) 2026 Ankit Khullar
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: click>=8.0
Requires-Dist: httpx>=0.27
Requires-Dist: rich>=13.0
Description-Content-Type: text/markdown

# open-batch-llm

A CLI tool to manage and run batch LLM calls.

## Installation

```bash
pip install open-batch-llm
```

Or with [uv](https://docs.astral.sh/uv/):

```bash
uv tool install open-batch-llm
```

## Usage

### Validate a batch request file

```bash
open-batch-llm validate requests.json
```

### Run batch requests (dry-run)

```bash
open-batch-llm run --dry-run requests.json
```

### Run batch requests

```bash
open-batch-llm run requests.json --provider openai --model gpt-4o-mini --output results.json
```

### Input file format

The input file must be a JSON array of request objects. Each object must contain a `prompt` key:

```json
[
  {"id": "req-1", "prompt": "What is 2 + 2?"},
  {"id": "req-2", "prompt": "Name the planets of the solar system."}
]
```

## Development

This project uses [uv](https://docs.astral.sh/uv/) as the package manager and build system.

```bash
# Install dependencies
uv sync --all-groups

# Run tests
uv run pytest

# Build the package
uv build
```

## Publishing

Releases are published to [PyPI](https://pypi.org/project/open-batch-llm/) automatically via GitHub Actions when a new GitHub Release is created. The workflow uses [Trusted Publishing (OIDC)](https://docs.pypi.org/trusted-publishers/) — no API token is needed.
