This package containes various helpers for developing bitbucket pipelines pipes
Project description
Pipetools
=========
This package contains various tools and helpers to make it more fun and easy for people to develope pipes.
Installation
============
`pip install bitbucket_pipes_toolkit`
Module pipetools.helpers
========================
Functions
---------
`configure_logger()`
: Configure logger to produce colorized output.
`enable_debug()`
: Enable the debug log level.
`fail(message='Fail!', do_exit=True)`
: Prints the colorized failure message (in red)
Args:
message (str, optional): Output message
do_exit (bool, optional): Call sys.exit if set to True
`get_variable(name, required=False, default=None)`
: Fetch the value of a pipe variable.
Args:
name (str): Variable name.
required (bool, optional): Throw an exception if the env var is unset.
default (:obj:`str`, optional): Default value if the env var is unset.
Returns:
Value of the variable
Raises
Exception: If a required variable is missing.
`required(name)`
: Get the value of a required pipe variable.
This function is basically an alias to get_variable with the required
parameter set to True.
Args:
name (str): Variable name.
Returns:
Value of the variable
Raises
Exception: If a required variable is missing.
`success(message='Success', do_exit=True)`
: Prints the colorized success message (in green)
Args:
message (str, optional): Output message
do_exit (bool, optional): Call sys.exit if set to True
=========
This package contains various tools and helpers to make it more fun and easy for people to develope pipes.
Installation
============
`pip install bitbucket_pipes_toolkit`
Module pipetools.helpers
========================
Functions
---------
`configure_logger()`
: Configure logger to produce colorized output.
`enable_debug()`
: Enable the debug log level.
`fail(message='Fail!', do_exit=True)`
: Prints the colorized failure message (in red)
Args:
message (str, optional): Output message
do_exit (bool, optional): Call sys.exit if set to True
`get_variable(name, required=False, default=None)`
: Fetch the value of a pipe variable.
Args:
name (str): Variable name.
required (bool, optional): Throw an exception if the env var is unset.
default (:obj:`str`, optional): Default value if the env var is unset.
Returns:
Value of the variable
Raises
Exception: If a required variable is missing.
`required(name)`
: Get the value of a required pipe variable.
This function is basically an alias to get_variable with the required
parameter set to True.
Args:
name (str): Variable name.
Returns:
Value of the variable
Raises
Exception: If a required variable is missing.
`success(message='Success', do_exit=True)`
: Prints the colorized success message (in green)
Args:
message (str, optional): Output message
do_exit (bool, optional): Call sys.exit if set to True
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
Close
Hashes for bitbucket-pipes-toolkit-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ca72b0b51e0898bb3d522a05b0fe4a5cb86a633aaf15a8cd186fe6d9a1596bf |
|
MD5 | 5c1c7feff4a8907b67292f6cc543cfc2 |
|
BLAKE2b-256 | 90c5aa4809b3518a485e814f9095eb2915782bb75195711971486531bedc4115 |