A Prefect collection for interacting with GitLab repositories. Provides blocks and tasks to manage GitLab resources (e.g., repositories, merge requests, CI/CD) within Prefect flows. Current version: 0.3.4. Released as part of the Prefect integration ecosystem; release cadence follows Prefect main branch releases.
pip install prefect-gitlabVerified import paths — ran on the pinned version, not inferred.
Minimal example: instantiate GitLabCredentials with a token, then use GitLabRepository to interact with a GitLab project.
Store the token as a Prefect Secret block and reference it using `GitLabCredentials(token=PREFECT_SECRET('my-gitlab-token'))` or pass via environment variable.Use the full path as shown in the GitLab UI (e.g., 'my-group/my-subgroup/my-project').
After upgrading Prefect, delete old blocks and create new ones via the UI or CLI: `prefect block register -m prefect_gitlab`.
Run `pip install prefect-gitlab` and ensure the import is `from prefect_gitlab import GitLabCredentials`.
Set the GITLAB_TOKEN environment variable, or use a Prefect Secret block: `GitLabCredentials(token=PREFECT_SECRET('my-gitlab-token'))`.Generate a new token in GitLab (Settings > Access Tokens) and update the credentials.