Skip to content

Instantly share code, notes, and snippets.

@DhritiShikhar
Created March 11, 2016 18:18
Show Gist options
  • Save DhritiShikhar/c94ac5081b9c6254f1e3 to your computer and use it in GitHub Desktop.
Save DhritiShikhar/c94ac5081b9c6254f1e3 to your computer and use it in GitHub Desktop.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import requests"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import pkgwat.api"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"response=requests.get(\"https://admin.fedoraproject.org/pkgdb/api/packager/package/chandankumar/\")\n"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"data=response.json()"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"all_issues=[]"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[{u'status': u'New', u'description': u'python-barbicanclient-4.0.0 is available', u'bug_class': u'', u'last_modified': u'7 days and 17 hours', u'release': u'Fedora rawhide', u'id': 1214740}]\n",
"[{u'status': u'New', u'description': u'python2-bashate - requires both python2 and python3', u'bug_class': u'', u'last_modified': u'7 days and 8 hours', u'release': u'Fedora 24', u'id': 1314529}]\n",
"[{u'status': u'Assigned', u'description': u'python-debtcollector-1.2.0 is available', u'bug_class': u'', u'last_modified': u'1 month, 17 days and 10 hours', u'release': u'Fedora rawhide', u'id': 1214707}]\n",
"[{u'status': u'New', u'description': u'python-oslo-context-0.5.0 is available', u'bug_class': u'', u'last_modified': u'6 months, 3 days and 8 hours', u'release': u'Fedora rawhide', u'id': 1214734}]\n",
"[{u'status': u'New', u'description': u\"[abrt] python3-reno: main.py:114:main:AttributeError: 'Namespace' object has no attribute 'func'\", u'bug_class': u'', u'last_modified': u'1 day', u'release': u'Fedora 23', u'id': 1316656}]\n",
"[{u'status': u'New', u'description': u'python-wrapt-1.10.6 is available', u'bug_class': u'', u'last_modified': u'3 months, 2 days and 17 hours', u'release': u'Fedora rawhide', u'id': 1289794}]\n"
]
}
],
"source": [
"for package in data[\"point of contact\"]:\n",
" pkg_details=pkgwat.api.bugs(package['name'])\n",
" if pkg_details['rows']:\n",
" print pkg_details['rows'][:3]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment