API details
evts = load_sample_events()

get_sparklines[source]

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.

limit_cb[source]

limit_cb(rem, quota)

Callback to warn user when close to using up hourly quota

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)

pct_comp[source]

pct_comp(api)

tail_events[source]

tail_events(evt, api)

Print events from fetch_events along with a counter of push events

watch_users[source]

watch_users(evts, api)

Print a table of the users with the most events

quad_logs[source]

quad_logs(evts, api)

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

simple[source]

simple(evts, api)

main[source]

main(mode:"Operation mode to run", include_bots:"Include bots (there's a lot of them!)"=False, types:"Comma-separated types of event to include (e.g PushEvent)"='', pause:"Number of seconds to pause between requests to the GitHub api"=0.4, filt:"Filtering method"=None, filtval:"Value to filter by (for repo use format owner/repo)"=None)