docs/integrations/prefect-bitbucket/api-ref/prefect_bitbucket-credentials.mdx
prefect_bitbucket.credentialsModule to enable authenticate interactions with BitBucket.
ClientType <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-bitbucket/prefect_bitbucket/credentials.py#L27" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>The client type to use.
BitBucketCredentials <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-bitbucket/prefect_bitbucket/credentials.py#L34" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Store BitBucket credentials to interact with private BitBucket repositories.
Attributes:
token: An access token to authenticate with BitBucket. This is required
for accessing private repositories.username: Identification name unique across entire BitBucket site.password: The password to authenticate to BitBucket.url: The base URL of your BitBucket instance.Examples:
Load stored BitBucket credentials:
from prefect_bitbucket import BitBucketCredentials
bitbucket_credentials_block = BitBucketCredentials.load("BLOCK_NAME")
Methods:
format_git_credentials <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-bitbucket/prefect_bitbucket/credentials.py#L93" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>format_git_credentials(self, url: str) -> str
Format and return the full git URL with BitBucket credentials embedded.
BitBucket has different authentication formats:
Args:
url: Repository URL (e.g., "https://bitbucket.org/org/repo.git")Returns:
Raises:
ValueError: If credentials are not properly configuredget_client <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/integrations/prefect-bitbucket/prefect_bitbucket/credentials.py#L154" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>get_client(self, client_type: Union[str, ClientType], **client_kwargs) -> Union[Cloud, Bitbucket]
Get an authenticated local or cloud Bitbucket client.
Args:
client_type: Whether to use a local or cloud client.Returns: