cat-sdk-3.1.2
توضیحات
Cat SDK for Python
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | cat-sdk-3.1.2 |
| نام | cat-sdk |
| نسخه کتابخانه | 3.1.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Cat Team and Contributors |
| ایمیل نویسنده | cat@dianping.com |
| آدرس صفحه اصلی | https://github.com/dianping/cat/tree/master/lib/python |
| آدرس اینترنتی | https://pypi.org/project/cat-sdk/ |
| مجوز | Apache License 2.0 |
===============================
Cat-Python - Cat SDK for Python
===============================
Python SDK of `CAT <https://github.com/dianping/cat>`.
Installation
============
Install via pip:
.. code:: bash
$ pip install cat-sdk
Code Demo
=========
.. code:: python
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 <https://github.com/dianping/cat/tree/master/lib/python>`_ for more information.
Changelog
=========
https://github.com/dianping/cat/blob/master/lib/python/CHANGELOG.md
نحوه نصب
نصب پکیج whl cat-sdk-3.1.2:
pip install cat-sdk-3.1.2.whl
نصب پکیج tar.gz cat-sdk-3.1.2:
pip install cat-sdk-3.1.2.tar.gz