Skip to content

Instantly share code, notes, and snippets.

View sminez's full-sized avatar

Innes Anderson-Morrison sminez

View GitHub Profile
@sminez
sminez / loggly_query.py
Created August 22, 2016 14:28
Query loggly from the command line: (argparser seems to cause 500s for some reason but calling from a repl works fine!)
import requests
import argparse
def print_dict(d, level=0):
'''
Convert a python dict to a pretty-print string.
Supports strings, nested dicts and lists as values.
'''
new_level = level + 1