-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
ENH Support alternative index urls #74
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! A few comments otherwise LGTM. Thanks @ryanking13 !
micropip/package_index.py
Outdated
|
||
|
||
async def search_packages( | ||
pkg: str, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.