Get the latest tech news

An analysis of module names inside top PyPI packages


Background Naming is important (as well as hard). Good names are good. Bad names are… bad. And we name a lot of things. In Python (a name) code is bundled and uploaded as a package (another name), usually to the Python Package Index (PyPI, a third name). Inside of these...

pip wants to extract METADATA out of wheels (which are just zips) without downloading the entire thing, so it has some clever code for doing “range requests” to only fetch a fraction of the bytes. But we’ve turned hunch into proof, and more importantly we can also compile a little mapping of the top packages’ prefixes that don’t fit the mold. Stick to a convention for your module names Upload wheels Avoid implicit or explicit namespace packages if you can help it Otherwise, if you have to choose… well, you know the saying ;)

Get the Android app

Or read this on Hacker News

Read more on:

Photo of analysis

analysis

Photo of PyPI

PyPI

Photo of module names

module names

Related news:

News photo

Meta-analysis: On average, undergraduate student intelligence is merely average

News photo

Air Freight Greenhouse Gas Emissions Up 25% Since 2019, Analysis Finds

News photo

Qualcomm Snapdragon X Elite Analysis - More efficient than AMD & Intel, but Apple stays ahead