Llama Parser (Preview)
Llama Parser is an API created by LlamaIndex to effeciently parse and represent files for effecient retrieval and context augmentation using LlamaIndex frameworks.
Available for free as a preivew, you can try it out today.
NOTE: Currently, only PDF files are supported.
Getting Started
First, login and get an api-key from https://cloud.llamaindex.ai.
Simply install the package:
pip install llama-parser
Then, you can run the following to parse your first PDF file:
from llama_parser import LlamaParser
parser = LlamaParser(
api_key="...", # can also be set in your env as LLAMA_CLOUD_API_KEY
result_type="markdown" # "markdown" and "text" are available
)
# sync
documents = parser.load_data("./my_file.pdf")
# async
documents = await parser.aload_data("./my_file.pdf")
Using with SimpleDirectoryReader
You can also integrate the parser as the default PDF loader in SimpleDirectoryReader:
from llama_parser import LlamaParser
from llama_index import SimpleDirectoryReader
parser = LlamaParser(
api_key="...", # can also be set in your env as LLAMA_CLOUD_API_KEY
result_type="markdown" # "markdown" and "text" are available
)
file_extractor = {".pdf": parser}
documents = SimpleDirectoryReader("./data", file_extractor=file_extractor).load_data()
Full documentation for SimpleDirectoryReader can be found on the LlamaIndex Documentation.
Examples
Serveral end-to-end indexing examples can be found in the examples folder
Metadata
Release files for llama-parser 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| llama_parser-0.1.2.tar.gz | 3.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llama_parser-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.7 kB
Release files / llama_parser-0.1.2.tar.gz
| Download URL | llama_parser-0.1.2.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b7b4c1dfe23573fd0ba09ac7301463fffd493e2b12308948009f0ca5c038a04
|
|
BLAKE2b-256 checksum How to use checksums |
def8a342a438683fe3bdc913c71bf0d8b9579505944ee635392f677e06ab846f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.10.12 Darwin/22.3.0
|
Release files / llama_parser-0.1.2-py3-none-any.whl
| Download URL | llama_parser-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
908c69632b4671542743a73ef3574a7c1fa730f70ceed1b2b86b6f69481efd09
|
|
BLAKE2b-256 checksum How to use checksums |
a170408f9b2ed393d1b3c70411433b813d35e39919d032030df02df63cab73f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.10.12 Darwin/22.3.0
|
Security for llama-parser 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.