Skip to content

mediawiki-utilities/python-mwsessions

Repository files navigation

MediaWiki sessions

This library provides a set of utilities for grouping MediaWiki user actions into sessions.

Basic example

>>> import mwsessions
>>>
>>> user_events = [
...     ("Willy on wheels", 20150101000000, {'rev_id': 1}),
...     ("Walter", 20150101000001, {'rev_id': 2}),
...     ("Willy on wheels", 20150101000001, {'rev_id': 3}),
...     ("Walter", 20150101000002, {'rev_id': 4}),
...     ("Willy on wheels", 20150101001001, {'rev_id': 5})
... ]
>>>
>>> for user, events in mwsessions.sessionize(user_events):
...     (user, events)
...
('Willy on wheels', [{'rev_id': 1}, {'rev_id': 3}])
('Walter', [{'rev_id': 2}, {'rev_id': 4}])
('Willy on wheels', [{'rev_id': 5}])

Author

See also

About

a set of utilities for grouping MediaWiki user actions into sessions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages