ghtop API

API details
evts = load_sample_events()

source

get_sparklines

 get_sparklines ()

When creating GhApi we can pass a callback which will be called after each API operation. In this case, we use it to warn the user when their quota is getting low.

def limit_cb(rem,quota):
    "Callback to warn user when close to using up hourly quota"
    w='WARNING '*7
    if rem < 1000: print(f"{w}\nRemaining calls: {rem} out of {quota}\n{w}", file=sys.stderr)

source

limit_cb

 limit_cb (rem, quota)

Callback to warn user when close to using up hourly quota


source

pct_comp

 pct_comp (api)

source

tail_events

 tail_events (evt, api)

Print events from fetch_events along with a counter of push events


source

watch_users

 watch_users (evts, api)

Print a table of the users with the most events


source

quad_logs

 quad_logs (evts, api)

Print 4 panels, showing most recent issues, commits, PRs, and releases


source

simple

 simple (evts, api)

source

main

 main (mode:_OpModes<Operationmodetorun>,
       include_bots:<Includebots(there'salotofthem!)>=False,
       types:str<Comma-separatedtypesofeventtoinclude(e.gPushEvent)>='', p
       ause:float<NumberofsecondstopausebetweenrequeststotheGitHubapi>=0.4
       , filt:_filts<Filteringmethod>=None,
       filtval:str<Valuetofilterby(for`repo`useformat`owner/repo`)>=None)