How to Search PyPI

(This may well not be the right place to post this. Feel free to point out a better forum.)

Over on Ideas someone thought it would be nice to have an @export decorator to keep __all__ up-to-date. I’d never considered that before, thought it was an interesting idea, and threw together a (bad) implementation.

Not long after, Brett Cannon replied:

I think you’re looking for something like atpublic · PyPI​.

Clearly, that’s better and more mature than my hastily tossed together function. (And, it was authored by Barry Warsaw, which immediately boosted its cred for me.) Time passed (a few hours), I watched some TV, switched from one plaform to another (phone to laptop) and I went looking for it again on PyPI. I at least remembered that it was on PyPI and that it was something like "public."​ Searching for “public” I couldn’t find it in the 10,000+ hits for that word, at least not in the first couple pages returned. It turns out that searching for “Barry Warsaw” brought it up immediately (I didn’t know you could search for a person), but if I restricted my searches to people whose names I recognized, I would probably miss all sorts of useful stuff. I scrolled to the bottom of the front page, but there doesn’t seem to be anything aimed at people searching PyPI, only people building packages. Am I missing something? Shouldn’t PyPI have a “How to Search PyPI” document?

2 Likes

(Does replying to a topic bump it?)

I have a related question. I want to search for a precise package name, in this case, mpl. I tried mpl and ^mpl$, but both searches included all sorts of packages containing mpl in their names. The sort function doesn’t even allow you to order the list alphabetically. If it did that, I could at least binary search the (many) pages of results. Strangely enough, mpl and ^mpl$ produce different numbers of results, so what I think of as regular expression special characters are doing something just not the something I had hoped for.

I repeat part of my original post:

Surely there must be a searching guide somewhere…