Skip to main content

Python SDK for Trailwatch by Kicksaw

Project description

Installation

pip install trailwatch

Getting Started

from trailwatch import configure, watch

configure(
  project="my-project",
  trailwatch_url="https://<random>.execute-api.us-west-2.amazonaws.com",
)

@watch()
def handler(event, context):
  # Do your thing
  return

Partial Success

Raise a PartialSuccess exception to indicate that the execution was partially successful. This exception is handled by Trailwatch to set execution status to partial and will not be propagated to the caller.

from trailwatch import configure, watch
from trailwatch.exceptions import PartialSuccessError

configure(
  project="my-project",
  trailwatch_url="https://<random>.execute-api.us-west-2.amazonaws.com",
)

@watch()
def handler(event, context):
  # Do your thing
  # You find out that only a subset of the work was successful
  # Log information about the failure normally using the logger
  raise PartialSuccessError

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

trailwatch-0.1.0.tar.gz (7.4 kB view hashes)

Uploaded Source

Built Distribution

trailwatch-0.1.0-py3-none-any.whl (10.1 kB view hashes)

Uploaded Python 3

Supported by

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