ccp-1.1
توضیحات
A Python client for the Changelog API
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | ccp-1.1 |
| نام | ccp |
| نسخه کتابخانه | 1.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Adam Papai |
| ایمیل نویسنده | wooh@wooh.hu |
| آدرس صفحه اصلی | http://github.com/woohgit/changelog-client-python |
| آدرس اینترنتی | https://pypi.org/project/ccp/ |
| مجوز | Copyright (c) 2014 Adam Papai. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
CCP: Changelog Client Python
============================
Send an event to a Changelog_ server.
.. _Changelog: https://github.com/prezi/changelog
Installation
------------
To install ccp, simply: ::
$ pip install ccp
Supported severities
--------------------
1. INFO
2. NOTIFICATION
3. WARNING
4. ERROR
5. CRITICAL
Example
-------
It is pretty easy to use: ::
from ccp.client import Client
client = Client("localhost", 80)
client.send("This is a simple message", "INFO", "category")
You can pass a dict to specify additional HTTP headers, for example to do authentication::
client.send("Message", "INFO", "category", {"Authorization": "Basic base64encoded"})
You can pass a dict to specify additional database fields:
client.send("Message", "INFO", "category", {"Authorization": "Basic base64encoded"}, extra_fields={"field_1": "value1", "field_2": "value2"})
Logging
-------
Logging happens into the logger called ``changelog_client`` by default. You can override it by setting the ``logger``
property of a client instance to a ``Logger`` object.
Version 1.1
+ Ability to pass extra fields in case if somebody forked the changelog server and added new db fields.
Version 1.0
+ 0.6b becomes stable 1.0 version
Version 0.6b
+ Fixed Basic Authorization example in README
Version 0.5b
+ Added SSL support
Version 0.4b
+ Added better logging thanks to abesto (https://github.com/abesto)
+ Added support for passing severity directly as an int thanks to abesto (https://github.com/abesto)
+ Add support for passing extra headers thanks to abesto (https://github.com/abesto)
Version 0.3b
+ Initial release
نحوه نصب
نصب پکیج whl ccp-1.1:
pip install ccp-1.1.whl
نصب پکیج tar.gz ccp-1.1:
pip install ccp-1.1.tar.gz