Skip to content

Instantly share code, notes, and snippets.

Avatar

Satyajit Ranjeev satran

View GitHub Profile
@satran
satran / github-issues.py
Created Apr 29, 2013
The small program used for the talk at Pune Python User Group meetup on April 2013. Please feel free to update this script and make a pull request.
View github-issues.py
# Packages and modules are imported to the scope using the import statement.
# If you wanted just a particular object from a module/package you can use
# the from <module> import <object>
import sys
import requests
# There are no constants in Python, still we can use a naming convention to
# imply that to the user of a library.
BASE_URL = "https://api.github.com"
@satran
satran / json_exception.py
Created Jul 16, 2012
JSON exception Middleware
View json_exception.py
from django.http import HttpResponseServerError
import json
import traceback
import sys
class JSONException(object):
'''
Return all exceptions as a JSON object.
'''
You can’t perform that action at this time.