Stats

hepdata.modules.stats.models

HEPData Stats Models.

hepdata.modules.stats.views

HEPData Stats Views.

hepdata.modules.stats.models

HEPData Stats Models.

class hepdata.modules.stats.models.DailyAccessStatistic(**kwargs)[source]
id
publication_recid
day
count

hepdata.modules.stats.views

HEPData Stats Views.

hepdata.modules.stats.views.get_date()[source]

Gets today’s date.

Returns

datetime object

hepdata.modules.stats.views.increment(recid)[source]

Increases the number of accesses to the record by 1.

Parameters

recid – id of the record accessed

Returns

hepdata.modules.stats.views.get_count(recid)[source]

Returns the number of times the record has been accessed.

Parameters

recid – record id to get the count for

Returns

dict with sum as a key {“sum”: 2}