ENH Support alternative index urls - #74
Conversation
rth
left a comment
There was a problem hiding this comment.
Very nice! A few comments otherwise LGTM. Thanks @ryanking13 !
|
|
||
|
|
||
| async def search_packages( | ||
| pkg: str, |
There was a problem hiding this comment.
Should it be search_package if it searches just 1 package? Also, it might be more user friendly to name the first argument name.
It's not "search" technically though. Search is returning top k results for a query, possibly with some pre-processing or fuzzing of the query. While this return a single response with which is the exact match. Maybe query_package? But I'm open to other name suggestions.
There was a problem hiding this comment.
Thanks for the suggestion! I wasn't aware of the difference between search and query :) I will go with query_package.
|
I removed the |
Resolve #7
This PR allows users to specify an index URL from which micropip can download packages. This allows users to install packages from a custom package index that provides PyPI-compatible APIs.
This PR covers both methods: modifying the index URL globally (
micropip.set_index_urls) and passing the index URL as a parameter tomicropip.install. This allows service operators like pyscript / jupyterlite to add their own package indexes as a default setting, while also allowing users to choose and use multiple indexes when needed.