Permalink
Browse files

exercises - github api with python

  • Loading branch information...
1 parent cb41d7e commit c8a2f1100da52e457968dad8035bb93c8e5d443f @hasantayyar committed May 10, 2012
View
7 exercises/exercise2_githubapi.py
@@ -0,0 +1,7 @@
+import requests
+#call guthub api and get user info
+url = 'https://api.github.com/user'
+auth = ('hasantayyar', 'passwordpassword')
+
+r = requests.get(url, auth=auth)
+print r.content
View
0 lesson4/skeleton/NAME/__init__.py
No changes.
View
18 lesson4/skeleton/setup.py
@@ -0,0 +1,18 @@
+try:
+ from setuptools import setup
+except ImportError:
+ from distutils.core import setup
+config = {
+ 'description': 'My Project',
+ 'author': 'My Name',
+ 'url': 'URL to get it at.',
+ 'download_url': 'Where to download it.',
+ 'author_email': 'My email.',
+ 'version': '0.1',
+ 'install_requires': ['nose'],
+ 'packages': ['NAME'],
+ 'scripts': [],
+ 'name': 'projectname'
+}
+
+setup(**config)
View
9 lesson4/skeleton/tests/NAME_tests.py
@@ -0,0 +1,9 @@
+from nose.tools import *
+import NAME
+
+def setup():
+ print "SETUP!"
+def teardown():
+ print "TEAR DOWN!"
+def test_basic():
+ print "I RAN!"
View
0 lesson4/skeleton/tests/__init__.p
No changes.

0 comments on commit c8a2f11

Please sign in to comment.