Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
avg = FloatType()
std_deviation = FloatType()
class Dimensions(Model):
date = ModelType(DateDimension)
initiated = ModelType(DateDimension)
completed = ModelType(DateDimension)
location = ModelType(GeoDimension)
# @todo: Support custom dimensions from signal
class MeanAnalysisComponent(Model):
mean = FloatType()
std_deviation = FloatType()
expected = FloatType()
excess = FloatType()
class CountAnalysisComponent(Model):
count = IntType()
expected = FloatType()
excess = FloatType()
class DailyAnalysis(Model):
date = DateType()
demand = ModelType(CountAnalysisComponent)
count = IntType()
class CategoryDimension(Model):
type = StringType()
options = ListType(ModelType(CategoryDimensionComponent))
class NumberDimension(Model):
type = StringType()
count = IntType()
min = IntType()
max = IntType()
avg = FloatType()
std_deviation = FloatType()
class Dimensions(Model):
date = ModelType(DateDimension)
initiated = ModelType(DateDimension)
completed = ModelType(DateDimension)
location = ModelType(GeoDimension)
# @todo: Support custom dimensions from signal
class MeanAnalysisComponent(Model):
mean = FloatType()
std_deviation = FloatType()
class CategoryDimension(Model):
type = StringType()
options = ListType(ModelType(CategoryDimensionComponent))
class NumberDimension(Model):
type = StringType()
count = IntType()
min = IntType()
max = IntType()
avg = FloatType()
std_deviation = FloatType()
class Dimensions(Model):
date = ModelType(DateDimension)
initiated = ModelType(DateDimension)
completed = ModelType(DateDimension)
location = ModelType(GeoDimension)
# @todo: Support custom dimensions from signal
class MeanAnalysisComponent(Model):
mean = FloatType()
std_deviation = FloatType()
expected = FloatType()
location = ModelType(GeoDimension)
# @todo: Support custom dimensions from signal
class MeanAnalysisComponent(Model):
mean = FloatType()
std_deviation = FloatType()
expected = FloatType()
excess = FloatType()
class CountAnalysisComponent(Model):
count = IntType()
expected = FloatType()
excess = FloatType()
class DailyAnalysis(Model):
date = DateType()
demand = ModelType(CountAnalysisComponent)
lead = ModelType(MeanAnalysisComponent)
span = ModelType(MeanAnalysisComponent)
class AnalysisResultSet(ResultSet):
results = ResultType(DailyAnalysis)
class Options(Signal.Options):
pass
class SignalResultSet(ResultSet):
results = ResultType(SavedSignal)
class DataPoint(Model):
uid = StringType(required=True)
date = DateTimeType(required=True)
latitude = FloatType(min_value=-90, max_value=90, required=True)
longitude = FloatType(min_value=-180, max_value=180, required=True)
initiated = DateTimeType()
completed = DateTimeType()
# @todo: Support custom dimensions from signal
class SignalDataPoints(Model):
id = StringType(required=True)
data_points = ListType(ModelType(DataPoint), required=True)
chunk_size = IntType(default=1000, max_value=5000, required=True)
class DateDimension(Model):
type = StringType()
count = IntType()
updated = DateTimeType()
deleted_reason = StringType()
duplicate_of_id = StringType()
class EventResultSet(ResultSet):
overflow = BooleanType()
results = ResultType(Event)
class CountResultSet(Model):
count = IntType()
top_rank = FloatType()
rank_levels = DictType(IntType)
categories = DictType(IntType)
labels = DictType(IntType)
class TopEventsSearchParams(SortableMixin, Model):
limit = IntType(min_value=0, max_value=10)
class CalendarParams(SearchParams):
top_events = ModelType(TopEventsSearchParams)
class CalendarDay(Model):
labels = ListType(StringType())
country = StringType()
rank = IntType()
# `local_rank`, `aviation_rank`, and `phq_attendance` are paid features.
# They will only show up in your response body if you
# have subscribed to them.
local_rank = IntType()
aviation_rank = IntType()
phq_attendance = IntType()
entities = ListType(ModelType(Entities))
location = GeoJSONPointType()
place_hierarchies = ListType(ListType(StringType()))
scope = StringType()
relevance = FloatType()
state = StringType()
first_seen = DateTimeType()
updated = DateTimeType()
deleted_reason = StringType()
duplicate_of_id = StringType()
class EventResultSet(ResultSet):
overflow = BooleanType()
results = ResultType(Event)
class CountResultSet(Model):
class AnalysisResultSet(ResultSet):
results = ResultType(DailyAnalysis)
class AnalysisParams(PaginatedMixin, SortableMixin, Model):
class Options:
serialize_when_none = False
id = StringType(required=True)
date = ModelType(DateTimeRange)
initiated = ModelType(DateTimeRange)
completed = ModelType(DateTimeRange)
within = StringListType(StringModelType(Area), separator="+")
significance = FloatType(min_value=0, max_value=100)
place = ModelType(Place)
class Dimensions(Model):
date = ModelType(DateDimension)
initiated = ModelType(DateDimension)
completed = ModelType(DateDimension)
location = ModelType(GeoDimension)
# @todo: Support custom dimensions from signal
class MeanAnalysisComponent(Model):
mean = FloatType()
std_deviation = FloatType()
expected = FloatType()
excess = FloatType()
class CountAnalysisComponent(Model):
count = IntType()
expected = FloatType()
excess = FloatType()
class DailyAnalysis(Model):
date = DateType()
demand = ModelType(CountAnalysisComponent)
lead = ModelType(MeanAnalysisComponent)
span = ModelType(MeanAnalysisComponent)
class SavedSignal(SignalID, Signal):
class Options(Signal.Options):
pass
class SignalResultSet(ResultSet):
results = ResultType(SavedSignal)
class DataPoint(Model):
uid = StringType(required=True)
date = DateTimeType(required=True)
latitude = FloatType(min_value=-90, max_value=90, required=True)
longitude = FloatType(min_value=-180, max_value=180, required=True)
initiated = DateTimeType()
completed = DateTimeType()
# @todo: Support custom dimensions from signal
class SignalDataPoints(Model):
id = StringType(required=True)
data_points = ListType(ModelType(DataPoint), required=True)
chunk_size = IntType(default=1000, max_value=5000, required=True)
class DateDimension(Model):
type = StringType()