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.2.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

llama_extract-0.0.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llama_extract-0.0.2.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Darwin/23.2.0

File hashes

Hashes for llama_extract-0.0.2.tar.gz
Algorithm Hash digest
SHA256 fc075396aff4003bda289c668ec57c9d85bd8624587a8017756cf51e936ce5c3
MD5 c566254c53bf7710f00363504e14627d
BLAKE2b-256 1f6aa7da4a23da233974b7c464bb884034e17eac4d5c20e8579f33af3146a16e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llama_extract-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Darwin/23.2.0

File hashes

Hashes for llama_extract-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9587f0a8239e0fc058daee1cf83d4491b5d57603fc8e316a52fcce7e24124b25
MD5 40c13978cca40b35d37cfbe34a877f94
BLAKE2b-256 7bb531d6afdf0a38350fe4a8377551bb52f40307e5a06025ab569eee94328e6c

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