Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Endpoint for searching packages #318

Closed
iambibhas opened this issue Apr 14, 2015 · 1 comment
Closed

API Endpoint for searching packages #318

iambibhas opened this issue Apr 14, 2015 · 1 comment

Comments

@iambibhas
Copy link

It'd be nice to have an API endpoint to search packages, so that anyone can build things on top of the site. It can return a list of packages, with the most important info -

[{
    "last_fetched": "2015-02-28T12:04:58.537",
    "slug": "django",
    "resource_uri": "/api/v3/packages/django/",
    "pypi_url": "http://pypi.python.org/pypi/Django",
    "repo_url": "https://github.com/django/django",
    "absolute_url": "/packages/p/django/",
    "repo_description": "The Web framework for perfectionists with deadlines.",
    "repo_watchers": 13087,
    "title": "Django",
    "pypi_version": "1.8b1",
    "documentation_url": "https://djangoproject.com",
    "participants": "adrianholovaty,malcolmt,freakboy3742,timgraham,aaugustin,claudep,jezdez,jacobian,spookylukey,alex,ramiro,andrewgodwin,gdub,akaariai,kmtracey,jbronn,pydanny,audreyr,etc",
    "modified": "2015-03-01T08:00:39.708",
    "usage_count": 356
},
{
    "last_fetched": "2015-02-28T12:04:58.537",
    "slug": "django",
    "resource_uri": "/api/v3/packages/django/",
    "pypi_url": "http://pypi.python.org/pypi/Django",
    "repo_url": "https://github.com/django/django",
    "absolute_url": "/packages/p/django/",
    "repo_description": "The Web framework for perfectionists with deadlines.",
    "repo_watchers": 13087,
    "title": "Django",
    "pypi_version": "1.8b1",
    "documentation_url": "https://djangoproject.com",
    "participants": "adrianholovaty,malcolmt,freakboy3742,timgraham,aaugustin,claudep,jezdez,jacobian,spookylukey,alex,ramiro,andrewgodwin,gdub,akaariai,kmtracey,jbronn,pydanny,audreyr,etc",
    "modified": "2015-03-01T08:00:39.708",
    "usage_count": 356
},
...
]

Search can take a string and search title and description with that. Results can be sorted by a combination of usage_count and modified.

@pydanny
Copy link
Collaborator

pydanny commented Oct 15, 2015

It's still in the alpha stage, but https://www.djangopackages.com/api/v4/search/.

It's what powers the search in the header bar. Right now there is no sorting, just a display of weighted results.

@jayfk jayfk closed this as completed Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants