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.0.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.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for llama_index_readers_gitlab-0.4.0.tar.gz
Algorithm Hash digest
SHA256 fae062749befb3571e642b120633e97b069fe2c2d2073afae18582d3610ea0bc
MD5 81ed6df897fa7efa89b2db211a5b2138
BLAKE2b-256 b44d43c07bcb478093a01a913d2d52b01c6bd65436ccf7f10ad89c8a06da42b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for llama_index_readers_gitlab-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 762ea024829c24d1e2543812c8ddc361bc3d14a28b0a51c55ae1a72d73b028b7
MD5 662e3cc9d5fc7bd9a8e6254217435b85
BLAKE2b-256 f7e13c6dca734b9130af26e356ef1945e1f87d670ebd60ad51ff16c9c917d748

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