A Python client for the Changelog API
Project description
Send an event to a Changelog server.
Installation
To install ccp, simply:
$ pip install ccp
Supported severities
- INFO
- NOTIFICATION
- WARNING
- ERROR
- 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size ccp-1.1.tar.gz (4.0 kB) | File type Source | Python version None | Upload date | Hashes View |