This is a Python wrapper for the Logentries API. The API object terms follow the semantics from the Logentries website, not the Logentries API.
The InactivityAlert and AnomalyAlert classes simulate a user login to create the appropriate alerts.
This is not endorsed or provided by Logentries, and no commercial support is provided.
To create a new tag called 'user_agent = curl' and associate it with a log called 'someset/somelog':
from logentries_api import Tags, Hooks, Labels, LogSets label = Labels().create('user_agent = curl') log = LogSets().get('someset/somelog') tag = Tags().create(label['sn']) hook = Hooks().create( name=label['title'], regexes=['user_agent = /curl\/[\d.]*/'], tag_id=tag['id'], logs=[log['key']] )
To install the latest release, type:
pip install python-logentries-api
To install the latest code directly from source, type:
pip install git+git://github.com/ambitioninc/python-logentries-api.git
Full documentation is available at http://python-logentries-api.readthedocs.org
MIT License (see LICENSE)