llama-index readers s3 integration
Project description
S3 File or Directory Loader
This loader parses any file stored on S3, or the entire Bucket (with an optional prefix filter) if no particular file is specified. When initializing S3Reader
, you may pass in your AWS Access Key. If none are found, the loader assumes they are stored in ~/.aws/credentials
.
All files are parsed with SimpleDirectoryReader
. Hence, you may also specify a custom file_extractor
, relying on any of the loaders in this library (or your own)!
Installation
pip install llama-index-readers-s3
Usage
To use this loader, you need to pass in the name of your S3 Bucket. After that, if you want to just parse a single file, pass in its key. Note that if the file is nested in a subdirectory, the key should contain that, so like subdirectory/input.txt
.
Otherwise, you may specify a prefix if you only want to parse certain files in the Bucket, or a subdirectory. AWS Access Key credentials may either be passed in during initialization or stored locally (see above).
loader = S3Reader(
bucket="scrabble-dictionary",
key="dictionary.txt",
aws_access_id="[ACCESS_KEY_ID]",
aws_access_secret="[ACCESS_KEY_SECRET]",
)
documents = loader.load_data()
This loader is designed to be used as a way to load data into LlamaIndex.
Project details
Release history Release notifications | RSS feed
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_index_readers_s3-0.4.0.tar.gz
.
File metadata
- Download URL: llama_index_readers_s3-0.4.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a025e92d9c88ad928d34383c864121e71c5712acfb07584b8c4e4e530108a338 |
|
MD5 | 0898246eb54de75104a4af059a381c86 |
|
BLAKE2b-256 | 9760535badd68985cf42c73892d0bcfb6523987766398b4e64e947ceac20b16d |
File details
Details for the file llama_index_readers_s3-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_readers_s3-0.4.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.10 Darwin/22.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5a69b1a335019a7067e52defc0c0a0c7a03a8758315352cc032a3afff8a72c1 |
|
MD5 | 385c707aad5911560f5c3af4bd2ae437 |
|
BLAKE2b-256 | cfc2b77c91fcf7aca89fe9d16e2a3f80cd261a1037eb99814fea64e7fe1a305e |