Skip to main content

A Prefect collection for working with GitLab repositories.

Project description

prefect-gitlab

PyPI

Welcome!

prefect-gitlab is a Prefect collection for working with GitLab repositories.

Getting Started

Python setup

Requires an installation of Python 3.9 or higher.

We recommend using a Python virtual environment manager such as pipenv, conda, or virtualenv.

This integration is designed to work with Prefect 2.3.0 or higher. For more information about how to use Prefect, please refer to the Prefect documentation.

Installation

Install prefect-gitlab with pip:

pip install prefect-gitlab

Then, register the block types) in this integration to view the storage block type on Prefect Cloud:

prefect block register -m prefect_gitlab

Note, to use the load method on a block, you must already have a block document saved.

Creating a GitLab storage block

In Python

from prefect_gitlab import GitLabRepository

# public GitLab repository
public_gitlab_block = GitLabRepository(
    name="my-gitlab-block",
    repository="https://gitlab.com/testing/my-repository.git"
)

public_gitlab_block.save()


# specific branch or tag of a GitLab repository
branch_gitlab_block = GitLabRepository(
    name="my-gitlab-block",
    reference="branch-or-tag-name",
    repository="https://gitlab.com/testing/my-repository.git"
)

branch_gitlab_block.save()


# Get all history of a specific branch or tag of a GitLab repository
branch_gitlab_block = GitLabRepository(
    name="my-gitlab-block",
    reference="branch-or-tag-name",
    git_depth=None,
    repository="https://gitlab.com/testing/my-repository.git"
)

branch_gitlab_block.save()

# private GitLab repository
private_gitlab_block = GitLabRepository(
    name="my-private-gitlab-block",
    repository="https://gitlab.com/testing/my-repository.git",
    access_token="YOUR_GITLAB_PERSONAL_ACCESS_TOKEN"
)

private_gitlab_block.save()

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

prefect_gitlab-0.3.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

prefect_gitlab-0.3.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prefect_gitlab-0.3.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for prefect_gitlab-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2de631fd6f7d9c4e47c8f555999f0f9fdec577097a114ae572effbd2be5d0f00
MD5 369d84e49483fdad9d05ddda66b417ad
BLAKE2b-256 d0102f3b0f0e2780df6ec1ec96b97b2648e63bb421fb6389bae02fbdb92f315a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prefect_gitlab-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0efa54ed3c0f21d14624f821553f93a06114d30d6154a67bc33336e123656259
MD5 19e21b6e67cf4112cc8322e35c267314
BLAKE2b-256 e7136a092157c192d1ddc88ae2a375ca14e3c22aa1f3b84107fc5af58b1e4d7b

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