]> code.communitydata.science - rises_declines_wikia_code.git/blob - mediawiki_dump_tools/Mediawiki-Utilities/mw/lib/sessions/event.py
add copy of the GPL
[rises_declines_wikia_code.git] / mediawiki_dump_tools / Mediawiki-Utilities / mw / lib / sessions / event.py
1 import logging
2 from collections import namedtuple
3
4 logger = logging.getLogger("mw.lib.sessions.event")
5
6
7 # class Event:
8 #   __slots__ = ('user', 'timestamp', 'data')
9 #
10 #   def __init__(self, user, timestamp, data=None):
11 #       self.user = user
12 #       self.timestamp = Timestamp(timestamp)
13 #       self.data = data
14
15 Event = namedtuple("Event", ['user', 'timestamp', 'data'])
16
17
18 def unpack_events(events):
19     return list(e.data for e in events)

Community Data Science Collective || Want to submit a patch?