Skip to content

Instantly share code, notes, and snippets.

View gdvalderrama's full-sized avatar

Guiomar Valderrama gdvalderrama

View GitHub Profile
@gdvalderrama
gdvalderrama / yesno.py
Created December 7, 2021 19:07
Script that asks a yes/no question
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
def yesno(question):
prompt = f'{question} (y/n): '
answer = input(prompt).strip().lower()
if answer not in ['y', 'n']:
@gdvalderrama
gdvalderrama / get_sentry_issue_events.py
Last active February 14, 2021 11:29
Request sentry issue events and save them to a CSV file
'''
Use: `python get_sentry_issue_events.py <sentry_token> <issue_id>`
Gets all events of an issue and saves them to a CSV.
The token can be generated at https://sentry.io/api/
Only the event:read permission is needed.
'''
import csv
import io