Story #2886
closedAs a user, I can publish a Python repository in a way that can be consumed by Pulp
100%
Description
This story is to implement PyPI's json API. This story is successful when a second Pulp can sync from a repository published by this Pulp.
Since we want to use the resulting api for both upload from twine, and syncing from Pulp we should provide a 'live' endpoint for the packages without using Pulp's publication/distribution mechanism, since those objects are only used for a 'flat' publish.
We would need a new view that would dynamically generate the json and the url for each PythonPackageContent, the 'url' in the json would link to the location of the package in the Content View.
This new view would provide an endpoint like
/pypi/{repo-name}/{package-name}/json
for each package in a repository. This new view would not have to support upload requests from twine, as that will be done in #2887
Related issues
Updated by amacdona@redhat.com over 7 years ago
- Blocked by Story #2884: As a user I can sync from PyPI added
Updated by mhrivnak over 7 years ago
Do you have any thoughts or a recommendation around prioritizing this one vs #2885 ?
Updated by amacdona@redhat.com over 7 years ago
This is only necessary for Pulp syncing from Pulp, so if only considering this plugin, this could be a pretty low priority. It is in the MVP, but could be done near the release.
This story could go into some exciting new territory, to create a custom API endpoint that implements PyPI's json API. Since the json API is simpler than puppet or crane, this story might be worth doing soon as a prototype for other plugins.
Updated by dalley over 4 years ago
- Status changed from NEW to POST
- Assignee set to gerrod
Added by gerrod over 4 years ago
Updated by gerrod over 4 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset c252306d2ac8566468466b06035b9f13dd64fc7a.
Implemented PyPi json API
Pulp now supports PyPi's json API with the new content endpoint '/pypi/{package-name}/json'. This will enable basic syncing from other Pulp instances. Also package classifiers are now included in Python content.
fixes: #2886 https://pulp.plan.io/issues/2886 fixes: #3627 https://pulp.plan.io/issues/3627