# Repository Briefing: run-llama/llama-parse-py
> Source: https://repoforai.com/repo/run-llama/llama-parse-py (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/run-llama/llama-parse-py
- **Official Docs / Website**: https://cloud.llamaindex.ai/
- **Category**: RAG, Data & Memory (知识库 / 爬虫 / 记忆层)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A+ (90/100 · Maintenance 35/35 · Adoption 15/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v2.20.0 (2026-11-20) — https://github.com/run-llama/llama-parse-py/releases
- **Review Snapshot**: 2026-12-01
- **Deployment / Stack Signals**: API
- **Momentum**: 70 ★ total (+0 24h / +1 7d) · 18 forks
- **Topics**: `agent`, `agents`, `document-agent`, `document-processing`, `information-extraction`, `llamaparse`, `ocr`, `parser`, `parsing`
- **When to Use**: Best for: Python teams that have selected Llama Cloud and want typed sync or async integration for document parsing and extraction in a production RAG ingestion pipeline. Skip if: Documents must stay offline or inside your network, you need to self-host the processing engine, or you cannot accept a managed API's latency, limits, or data-handling terms.

## Overview
```text
### Architecture & Core Mechanics
`llama_cloud` is a Stainless-generated Python client for the Llama Cloud REST API, not a document-processing engine. A typical flow uploads a document through `files.create`, then passes its file ID to `parsing.create`, which returns a job ID. The application owns workflow orchestration; Llama Cloud executes OCR and parsing.

`LlamaCloud` and `AsyncLlamaCloud` expose the same API operations through synchronous and asynchronous interfaces. The package uses `httpx>=0.23.0,<1` and `pydantic>=1.9.0,<3`, with TypedDicts for nested requests and Pydantic models for responses. Custom transports, proxies, a configurable base URL, and lower-level HTTP methods provide escape hatches without requiring a fork.

### Key Capabilities & Differentiators
Parsing accepts a tier and a version; examples use `fast` and `agentic`. Uploads accept bytes, a path-like object, or a tuple containing filename, content, and media type. The async client reads path-like uploads asynchronously. The SDK also exposes extraction and index operations, and paginated list calls support either automatic iteration or explicit cursor handling.

Pydantic responses can be serialized to JSON or dictionaries, and `model_fields_set` distinguishes an omitted field from an explicit null. Raw-response wrappers expose HTTP headers; streaming wrappers defer reading the body and use a context manager to close the response. This is HTTP response streaming, not a guarantee that parsing results arrive incrementally.

### Trade-offs & Limitations
Compared with handwritten REST calls, the SDK removes much of the boilerplate for request types, pagination, retries, and error mapping while retaining access to raw HTTP responses. Compared with a local OCR and parsing stack, it avoids running the processing engine yourself but puts network latency, service limits, and usage costs on the ingestion path. The MIT license covers the SDK, not an offline or self-hosted edition of the service.

The default one-minute timeout applies to a request, not the full parsing job. Connection errors and HTTP 408, 409, 429, and 5xx responses are retried twice by default. Set a separate job deadline, cap concurrency, and verify the API's duplicate-submission behavior before layering application retries over job creation. For sensitive inputs, confirm cloud-service data handling before committing to the integration.

### Hardware & Deployment Guide
Install `llama_cloud` on Python 3.9 or later and supply `LLAMA_CLOUD_API_KEY` through the runtime's secret configuration. The application needs network access to Llama Cloud, not local model weights or a GPU. Both clients default to httpx; install `llama_cloud[aiohttp]` and pass `DefaultAioHttpClient()` if the async workload benefits from that backend. Reuse clients for connection pooling and close them on shutdown.

Release v2.18.0 moved Index v2 indexing, retrieval, and chat out of beta, and exposed Verify under `client.alpha.verify`. v2.19.0 added `expand=usage` to the classification job GET endpoint, while v2.20.0 exposed the Max effort option for extraction. Pin the SDK and run integration tests before upgrading; the package allows some breaking changes in minor releases.
```

## Key Capabilities
```text
- Job submission: Upload a file, then create a parsing job using its file ID, parsing tier, and version.
- Typed API: TypedDict request structures and Pydantic response models cover the documented API surface.
- Concurrency: Sync and async clients use httpx by default; the async client can switch to aiohttp.
- Pagination: List endpoints support automatic iteration, explicit next-page requests, and direct cursor access.
- Failure handling: Typed connection and status exceptions, two default retries for eligible failures, and a configurable one-minute request timeout.
- HTTP control: Custom transports and proxies, raw response headers, and context-managed body streaming.
```

## Quick Start / Clone
```bash
# install from PyPI
pip install llama_cloud
```
