Skip to main content

Cat SDK for Python

Project description

Python SDK of CAT <https://github.com/dianping/cat>.

Installation

Install via pip:

$ pip install cat-sdk

Code Demo

import cat
import time

cat.init("appkey")

with cat.Transaction("foo", "bar") as t:
    try:
        t.add_data("hello")
        t.add_data("foo", "bar")
        cat.log_event("hook", "before")
        # do something
    except Exception as e:
        cat.log_exception(e)
    finally:
        cat.metric("api-count").count()
        cat.metric("api-duration").duration(100)
        cat.log_event("hook", "after")
time.sleep(1)

Documentation

Please check Github for more information.

Project details


Download files

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

Files for cat-sdk, version 3.1.2
Filename, size & hash File type Python version Upload date
cat-sdk-3.1.2.tar.gz (250.3 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page