Skip to main content

llama-index readers bitbucket integration

Project description

Bitbucket Loader

This loader utilizes the Bitbucket API to load the files inside a Bitbucket repository as Documents in an index.

Usage

To use this loader, you need to provide as environment variables the BITBUCKET_API_KEY and the BITBUCKET_USERNAME.

import os
from llama_index import VectorStoreIndex, download_loader

os.environ["BITBUCKET_USERNAME"] = "myusername"
os.environ["BITBUCKET_API_KEY"] = "myapikey"

base_url = "https://myserver/bitbucket"
project_key = "mykey"

BitbucketReader = download_loader("BitbucketReader")

loader = BitbucketReader(
    base_url=base_url,
    project_key=project_key,
    branch="refs/heads/develop",
    repository="ms-messaging",
)
documents = loader.load_data()

index = VectorStoreIndex.from_documents(documents)

This loader is designed to be used as a way to load data into Llama Index and/or subsequently used as a Tool in a LangChain Agent. See here for examples.

For a step-by-step guide, checkout this tutorial

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_bitbucket-0.1.3.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

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