bexchange.statistics package

Submodules

bexchange.statistics.statistics module

class bexchange.statistics.statistics.simple_stat_plugin(spid, sptype, statmgr)[source]

Bases: object

Simple statistics plugin that will call the stat mgrs increment function

increment(origin, meta)[source]

Calls the statistics managers increment method :param origin: The origin :param meta: The metadata

class bexchange.statistics.statistics.statistics_manager(db)[source]

Bases: object

The statistics manager. Will create and register the statistics plugin

cleanup_statentry(age)[source]
get_statistics(nid, querydata)[source]

Returns the statistics for the specified post, origin and source_name

get_statistics_entries(nid, querydata)[source]

Returns the statistic entries for the specified post, origin and source_name

increment(spid, origin, meta, save_post=False, increment_counter=True, optime=0, optime_info=None)[source]

Increments a counter that is defined by: :param spid: The id used to identify this statistics post :param orgin: the origin (may be null, indicating unknown origin) :param meta: the metadata

list_statistic_ids(nid)[source]

:returns the list of available ids

parse_filter(parsestr)[source]
classmethod plugin_from_conf(conf, statmgr)[source]

Creates a stat plugin from the configuration :param conf: The config as a dictionary :param statmgr: The statistics manager to use :returns a stat plugin

classmethod plugins_from_conf(conf, statmgr)[source]

Creates a stat plugin from the configuration :param conf: The config as a dictionary :param statmgr: The statistics manager to use :returns a stat plugin

sqldatabase()[source]

:return the sqlalchemy database instance used

Module contents