Skip to content

Instantly share code, notes, and snippets.

gbaman /
Created Nov 1, 2017
An example on using the Github GraphQL API with Python 3
# An example to get the remaining rate limit using the Github GraphQL API.
import requests
headers = {"Authorization": "Bearer YOUR API KEY"}
def run_query(query): # A simple function to use to make the API call. Note the json= section.
request ='', json={'query': query}, headers=headers)
if request.status_code == 200:
mbiette /
Created Sep 24, 2015
Simple python script to send an email with a csv attached
# coding=utf-8
__author__ = 'Maxime Biette'
conf = {
'from': '',
'to': '',
'server': '',
'port': '587',
'tls': 'yes',
'login': '',