import os
import pwd
import json
import socket
from urllib import request, parse
URL = 'https://meta.wikimedia.org/beacon/event'
def log_event(schema, rev_id, wiki, event):
    payload = {
        'schema': schema,
        'revision': rev_id,
        'wiki': wiki,
        'event': event
    }
    url = "%s?%s" % (URL, urllib.parse.quote_plus(json.dumps(payload)))
    print(request.urlopen(url))
username = pwd.getpwuid(os.getuid()).pw_name
hostname = socket.getfqdn()
data = {
    'username': username,
    'command': 'jstart',
    'commandline': 'jsub',
    'hostname': hostname
}
log_event('ToolsJobManipulation', 15237188, 'enwiki', data)
<http.client.HTTPResponse object at 0x7f01240507b8>
from ipywidgets import interact_manual, interactive, fixed
@interact_manual
def test(username=5,fromdate="someday",todate="something"):
    print(username)
    print(fromdate)
8
somedaydsad