Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_readers_s3-0.3.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

llama_index_readers_s3-0.3.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_readers_s3-0.3.0.tar.gz.

File metadata

  • Download URL: llama_index_readers_s3-0.3.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for llama_index_readers_s3-0.3.0.tar.gz
Algorithm Hash digest
SHA256 813b1e440747656da3cdec0ddeb442e81f320a032ef07ed8dcde99747d43d672
MD5 96dc232923368234167004d2c513e061
BLAKE2b-256 d27a27bab96a22f164aafebc4c2150df4f038ebde89678207e568c89fe4b825f

See more details on using hashes here.

File details

Details for the file llama_index_readers_s3-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_s3-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2bc51d15d587b80093f24b926116ada165e5d59ce25a4f2a5a5b1b3bb152cb9
MD5 477bd6f02670f1a5c004777eb6791947
BLAKE2b-256 331dfff703690f5178e6c87d4e0c834d8f01c82f9ab3e6d2c3b5c0e14ecb61dd

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