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
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
Built Distribution
File details
Details for the file llama_extract-0.0.1.tar.gz
.
File metadata
- Download URL: llama_extract-0.0.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.0 Linux/6.5.0-1023-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc654bbafc2d003475cb18ebbe3a8ce3cd7f4f4cddebf396b56c8c0be9232d2b |
|
MD5 | f918be0b877079dea28fad63ce516349 |
|
BLAKE2b-256 | 47d8e6055f36741215d91f4e5361685baae7f0397d10d94c6daeeac95cf6d0bd |
File details
Details for the file llama_extract-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: llama_extract-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.0 Linux/6.5.0-1023-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dda1c7825d808f5e650ae948a1784a046a4c75385e29f8d72086e988c87fb624 |
|
MD5 | f11047afa1881a3337c3beb439b7548a |
|
BLAKE2b-256 | 0775fa1f222a969391dafeec21b93c8eee05723768379a963bd9a6da3dc9edf8 |