prefect_gitlab.credentials
¶
Module used to enable authenticated interactions with GitLab
GitLabCredentials
¶
Bases: Block
Store a GitLab personal access token to interact with private GitLab repositories.
Attributes:
Name | Type | Description |
---|---|---|
token |
SecretStr
|
The personal access token to authenticate with GitLab. |
url |
str
|
URL to self-hosted GitLab instances. |
Examples:
Load stored GitLab credentials:
from prefect_gitlab import GitLabCredentials
gitlab_credentials_block = GitLabCredentials.load("BLOCK_NAME")
Source code in prefect_gitlab/credentials.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
get_client
¶
Gets an authenticated GitLab client.
Returns:
Type | Description |
---|---|
Gitlab
|
An authenticated GitLab client. |
Source code in prefect_gitlab/credentials.py
46 47 48 49 50 51 52 53 54 55 56 |
|