Skip to main content

llama-index readers gitlab integration

Project description

LlamaIndex Readers Integration: Gitlab

pip install llama-index-readers-gitlab

The gitlab readers package leverages python-gitlab to fetch contents from gitlab projects. It consists of two separate readers:

  1. Repository Reader
  2. Issues Reader

Access token or oauth token is required for private groups and projects.

Repository Reader

This reader will read through files in a repo based on branch or commit.

import gitlab
from llama_index.readers.gitlab import GitLabRepositoryReader

gitlab_client = gitlab.Gitlab("https://gitlab.com")

project_repo_reader = GitLabRepositoryReader(
    gitlab_client=gitlab_client,
    project_id=project_id,
    verbose=True,
)

docs = project_repo_reader.load_data(file_path="README.rst", ref="develop")

Issues Reader

import gitlab
from llama_index.readers.gitlab import GitLabIssuesReader

gitlab_client = gitlab.Gitlab("https://gitlab.com")

# load issues by project id
project_issues_reader = GitLabIssuesReader(
    gitlab_client=gitlab_client,
    project_id=project_id,
    verbose=True,
)

docs = project_issues_reader.load_data(
    state=GitLabIssuesReader.IssueState.OPEN
)

# load issues by group id
group_issues_reader = GitLabIssuesReader(
    gitlab_client=gitlab_client,
    group_id=group_id,
    verbose=True,
)

docs = group_issues_reader.load_data(state=GitLabIssuesReader.IssueState.OPEN)

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_gitlab-0.5.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_readers_gitlab-0.5.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_readers_gitlab-0.5.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_readers_gitlab-0.5.1.tar.gz
Algorithm Hash digest
SHA256 09f5dae587f64da257997353eca2efc59c5a0607e99bb055f9d231a18667a074
MD5 b2775a438c93a4aa6c23f41b5d709a7e
BLAKE2b-256 d77d5a9e0d7e47be476009961decf2f505a794a2bff25c2ce7f652d88e877019

See more details on using hashes here.

File details

Details for the file llama_index_readers_gitlab-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_readers_gitlab-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9ece5226530439a90a4d98276d25a4909bdb39083d9eadb7f6696e10e655fb80
MD5 51aa5c9cfb8e8fbfa81695e22e04c852
BLAKE2b-256 816a20dcfc30ebbef73cb848aec4121d245500e7450b16929431d04e6d2b5d2a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page