this post was submitted on 26 Mar 2025
13 points (100.0% liked)

Programming

19246 readers
40 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
 

Where can you view package details like dependencies and package size on PyPI like on npm?

For example, when I look at React's page on npm, I can see that it has 0 dependencies and an unpacked size of 237kB.

On the other hand, when I visit Flask's page on PyPI, I can't seem to find it's dependencies even after clicking on project details.

top 4 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 3 points 5 days ago

Don't most of these projects have a requirements.txt? That would be my first thought when trying to find deps. Getting the size of a package is above my head.

[โ€“] [email protected] 3 points 5 days ago (1 children)

You haven't missed anything; there isn't any such place. There's a bunch of suggestions on how you could patch such a thing together StackOverflow: Is there a way to list pip dependencies/requirements?. Basically either running pip or querying the PyPI API to discover transitive dependencies. Sounds like a fun little programming project! ๐Ÿ˜€

[โ€“] [email protected] 3 points 5 days ago (1 children)

Sounds like pain.

sad Tama

Thanks anyway.

[โ€“] [email protected] 2 points 5 days ago

Python deps can be dynamic, so it can be necessary to download the package and execute code just to find out.

Would be nice to see a resource that lists out the statically defined ones, though. Perhaps that'd pressure the dynamic ones to change -- it's a cause for some of the notorious pain of Python packaging.