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.3.tar.gz
.
File metadata
- Download URL: llama_extract-0.0.3.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.0 Linux/6.5.0-1024-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e6b70c3df5ae60213882e3017768b51040a43e7424e963293baedafcf723033 |
|
MD5 | f67c849b5fcbb94e430dbf6731fdf440 |
|
BLAKE2b-256 | 996d186e5ad173fbf385f1a861c730ec5317f11a7dfb8ba13c88de241c155b30 |
File details
Details for the file llama_extract-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: llama_extract-0.0.3-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.0 Linux/6.5.0-1024-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69166ac577780c73a6b8d816ecb43b0d5fafbf252af9eaa48a1522e2cd748589 |
|
MD5 | 583c533fcdf8137eea2941c2ed5368bc |
|
BLAKE2b-256 | b2cf5c117cdc1e0f2b309459efef7939a6fadf90fc130bcd1373ff81f62f18ee |