API¶
-
class
lookout.PackageVersion[source]¶ Bases:
objectAttempts to determine the package’s version.
-
static
from_distribution() → typing.Union[str, NoneType][source]¶ Gets the package version from its installed distribution using
pkg_resources.
-
static
lookout.exceptions¶
-
exception
lookout.exceptions.UnknownSchemaError[source]¶ Bases:
ExceptionRaised when a report doesn’t match any of the known schemas.
-
msg= "The supplied JSON data doesn't match any known report schema."¶
-
-
exception
lookout.exceptions.JSONDecodeError(msg, doc, pos)[source]¶ Bases:
ValueErrorSubclass of ValueError with the following additional properties:
msg: The unformatted error message doc: The JSON document being parsed pos: The start index of doc where parsing failed lineno: The line corresponding to pos colno: The column corresponding to pos
lookout.logging¶
lookout.models¶
-
class
lookout.models.Report(*args, **kwargs)[source]¶ Bases:
django.db.models.base.ModelA report filed through the HTTP Reporting API.
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
body¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
created_time¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_created_time(*, field=<django.db.models.fields.DateTimeField: created_time>, is_next=True, **kwargs)¶
-
get_next_by_incident_time(*, field=<django.db.models.fields.DateTimeField: incident_time>, is_next=True, **kwargs)¶
-
get_previous_by_created_time(*, field=<django.db.models.fields.DateTimeField: created_time>, is_next=False, **kwargs)¶
-
get_previous_by_incident_time(*, field=<django.db.models.fields.DateTimeField: incident_time>, is_next=False, **kwargs)¶
-
get_type_display(*, field=<django.db.models.fields.CharField: type>)¶
-
incident_time¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects= <lookout.models.ReportManager object>¶
-
schema¶
-
type¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
url¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
uuid¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
lookout.urls¶
URL patterns for the API endpoint.
Add the endpoint to your urls.py like so:
urlpatterns = [
...
# Django Lookout
url(r'^reporting', include('lookout.urls')),
...
]