Skip to content

Commit

Permalink
Added doc_string to _get_JSON
Browse files Browse the repository at this point in the history
Added new stub
Build first version of the documentation according to issue #12
  • Loading branch information
fccoelho committed Jan 19, 2017
1 parent 7417154 commit 14daa33
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions pypixplore/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ def __init__(self, server='https://pypi.python.org/pypi'):
self.client = xmlrpcclient.ServerProxy(server)

def _get_JSON(self, package_name):
"""
Gets JSON record for a given package
:param package_name: name of the package
:return: dictionary
"""
url = 'http://pypi.python.org/pypi/{}/json'.format(package_name)
ans = requests.get(url)
return ans.json()
Expand All @@ -26,3 +31,6 @@ def dependency_graph(self, package_name):

def get_popularity(self, package_name):
pass

def release_series(self, package_name):
pass
2 changes: 1 addition & 1 deletion tests/test_local.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pypixplore.local import *
from pypixplore.local import InstalledPackages
import pytest


Expand Down
2 changes: 1 addition & 1 deletion tests/test_remote.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pypixplore.remote import *
from pypixplore.remote import Index
import pytest

class Tests:
Expand Down

0 comments on commit 14daa33

Please sign in to comment.