Skip to main content

Infer schema and extract data from unstructured files

Project description

LlamaExtract (Experimental)

LlamaExtract is an API created by LlamaIndex to efficiently infer schema and extract data from unstructured files.

LlamaExtract directly integrates with LlamaIndex.

Note: LlamaExtract is currently experimental and may change in the future.

Read below for some quickstart information, or see the full documentation.

Getting Started

First, login and get an api-key from https://cloud.llamaindex.ai ↗.

Install the package:

pip install llama-extract

Now you can easily infer schemas and extract data from your files:

import nest_asyncio

nest_asyncio.apply()

from llama_extract import LlamaExtract

extractor = LlamaExtract(
    api_key="llx-...",  # can also be set in your env as LLAMA_CLOUD_API_KEY
    num_workers=4,  # if multiple files passed, split in `num_workers` API calls
    verbose=True,
)

# Infer schema
schema = extractor.infer_schema(
    "my_schema", ["./my_file1.pdf", "./my_file2.pdf"]
)

# Extract data
results = extractor.extract(schema.id, ["./my_file1.pdf", "./my_file2.pdf"])

Examples

Several end-to-end examples can be found in the examples folder

Documentation

https://docs.cloud.llamaindex.ai/

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_extract-0.0.4.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

llama_extract-0.0.4-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file llama_extract-0.0.4.tar.gz.

File metadata

  • Download URL: llama_extract-0.0.4.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.3 Darwin/23.5.0

File hashes

Hashes for llama_extract-0.0.4.tar.gz
Algorithm Hash digest
SHA256 6dcf1d0bd671a34521ce37c88a06a84e130200f3e09477ffc8428f406bd4088c
MD5 fb0b8ffacdbb609e7d4799c0f6ee3478
BLAKE2b-256 f7298feedd5f1c05259b01fb592d3c2b39cb4c08eee9c5cb53dd669189a907de

See more details on using hashes here.

File details

Details for the file llama_extract-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: llama_extract-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.3 Darwin/23.5.0

File hashes

Hashes for llama_extract-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 24bfe6e2ccbb221cb18c8d01a8f968e1c380e8d66b25955bfa30e6a48ef09e9c
MD5 acfeea869258b57f34126250a340b9d1
BLAKE2b-256 41478fc495b22a6521db9df32d306c98d7d4984f510a907985264970d8471226

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page