Skip to content

search by import name #5375

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

Open
toejough opened this issue Feb 1, 2019 · 0 comments
Open

search by import name #5375

toejough opened this issue Feb 1, 2019 · 0 comments
Labels
feature request search Opensearch, search filters, and so on

Comments

@toejough
Copy link

toejough commented Feb 1, 2019

What's the problem this feature will solve?
I can't search pypi for what distribution package provides a particular import package.

Describe the solution you'd like
I'd like an API to be able to search based on import name.

Additional context
I have three concrete use-cases in mind:

  • I'd like to easily find what distribution package provides a particular import package. For example, if I want to find out what package I get bpdb from, I have to do a google search and dig around, because that's exposed by bpython, but the only result when searching pypi is pytest-bpdb. Or I could search all of my projects and find the last place I used this package, then look at their package setups and try to divine which distribution package it came from.
  • I'd like to be able to see what distribution packages implement the same import package, or forks of it. My prime example is pillow, which you can drop-in for PIL. Searching for PIL doesn't even result in pillow, though. That's really unfortunate, because pillow is a much better, much more recently maintained fork.
  • This one is perhaps overly specific, but: I'd like to be able to create a tool that will automatically (or semi-automatically) add the proper config to setup.py (or pyproject.toml (or requirements.txt)) necessary to actually install the packages that provide the imports found in a package I'm editing. I can presently scan a project for imports and identify when an import package isn't importable in the current venv, but I have no way to even suggest to the developer what distribution package they should install. The current manual process described in the first bullet is the worst: tedious manually, and near impossible to automate.

I suppose I've gotten by (and so has everyone else!?) without this ability for a long time, but when I went looking for it, I thought surely I'd find it. I'm still halfway thinking I must be missing something. If I am, I hope someone will point me in the right direction. If I'm not, I hope this feature sounds sensible/useful enough to implement!

Finally, I'm aware that there are limited devs with limited time working on the warehouse. I already get so much from this project/site, and most of the time I just take it for granted. Thank you for this resource and the work being done on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request search Opensearch, search filters, and so on
Projects
None yet
Development

No branches or pull requests

3 participants