def process_flags(argv):
    """Uses the command-line flags to set the logging level.
  Args:
    argv: List of command line arguments passed to the python script.
  """
try:
    argv = FLAGS(argv)
except gflags.FlagsError as e:
    print('%s\nUsage: %s ARGS\n%s' % (e, argv[0], FLAGS))
sys.exit(1)
logging.getLogger().setLevel(getattr(logging, FLAGS.logging_level))
Доступ к Google Analytics API без локального браузера в python