Giter Club home page Giter Club logo

prefect-gitlab's Introduction

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.8 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()

In the UI

Click on the Blocks menu, then click the + button in the page header to open the block catalog: blocks menu

Then, find the GitLab block and click the Add button: GitLab block catalog entry

Finally, enter your repository information in the form and click Create: GitLab repository information form

Resources

If you encounter any bugs while using prefect-gitlab, feel free to open an issue in the prefect-gitlab repository.

If you have any questions or issues while using prefect-gitlab, you can find help in the Prefect Slack community.

Feel free to ⭐️ or watch prefect-gitlab for updates!

Development

If you'd like to install a version of prefect-gitlab for development, clone the repository and perform an editable install with pip:

git clone https://github.com/prefecthq/prefect-gitlab.git

cd prefect-gitlab/

pip install -e ".[dev]"

# Install linting pre-commit hooks
pre-commit install

prefect-gitlab's People

Contributors

desertaxle avatar ahuang11 avatar rpeden avatar jeffery9876 avatar zzstoatzz avatar sgsfak avatar urimandujano avatar dependabot[bot] avatar gabcoyne avatar chrisguidry avatar anna-geller avatar discdiver avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.