Skip to main content

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bitbucket-pipes-toolkit-1.1.0.tar.gz (5.6 kB view details)

Uploaded Source

File details

Details for the file bitbucket-pipes-toolkit-1.1.0.tar.gz.

File metadata

  • Download URL: bitbucket-pipes-toolkit-1.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for bitbucket-pipes-toolkit-1.1.0.tar.gz
Algorithm Hash digest
SHA256 17d2f5775d7478cb4de1fa703acbc01fddfc8c29a86a00fd2f56327a6e8015a0
MD5 7588ce072e1774e5981ea416f9da57cd
BLAKE2b-256 2a31d2e4ae219f080493b28cc1cecc56fa1d6a0ca5ec22847922f35a83e610e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page