A Prefect collection for working with GitLab repositories.
Project description
prefect-gitlab
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()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file prefect_gitlab-0.2.7.tar.gz
.
File metadata
- Download URL: prefect_gitlab-0.2.7.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cbc74777402095c6c7aa041ed08af62518ed60651ea7626c3c33decd04d29ee |
|
MD5 | da7989fadf2c612bf78bb5126036b285 |
|
BLAKE2b-256 | 412b79846e9ab1e7aa49bb5d3fbd53f7f0d24b40da56b341403a052d88691fb4 |
File details
Details for the file prefect_gitlab-0.2.7-py3-none-any.whl
.
File metadata
- Download URL: prefect_gitlab-0.2.7-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6012fcf105f3bfcf8062774530af8d8bd080a9d3f1d5309e7ab08f613748067 |
|
MD5 | 1bb484f566d8fe20380d31c388ae5157 |
|
BLAKE2b-256 | d3488a7bd3ff11675ff2781985bc4bf6187f59f22572d62853b4744268bd8240 |