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.4.1.tar.gz (6.2 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.4.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for llama_index_readers_gitlab-0.4.1.tar.gz
Algorithm Hash digest
SHA256 03f164d70ae69f2d44989a32f7b7d1107d3c007cbee82e3b9b85a6973982a8da
MD5 62e389d36d98bb3df0c2820c1a9f8e2d
BLAKE2b-256 f3bea46d02c2d306aa0421f230b790f473f5d3da3737dfe0e4750b5beb076b51

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_readers_gitlab-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4e393e5a2cc5c299057df4bae5db7bb0ab9d8f882c98214428c501fc4a5522e3
MD5 68795ccfc8b3b0ed879e1fc25641d95f
BLAKE2b-256 ef161801e1e2994bffefe6221ed9663e06c821b59c2746f2652d15b1894f7e7e

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