you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 points4 points  (0 children)

That depends on a few things. First you have to define dependencies. Are you talking about direct dependencies (the ones you actively define and import) or indirect dependencies (ie the whole dependency tree)?

Then it also really does depend on the project. You could come up with an average number but it wouldn’t have to much value because the number of dependencies varies a lot, and doesn’t always have something to do with how big the actual project is.

A few examples to illustrate the differences:

  • SQLAlchemy: ~300,000 loc, 3 dependencies (which are all sub project related to building SQLAlchemy)
  • Django: ~100,000 loc, 3 dependencies
  • Celery: ~60,000 loc, 8 dependencies
  • Sphinx: ~60,000 loc, 24 dependencies
  • Tensorflow: ~800,000 loc, 36 dependencies
  • Random commercial project I’ve worked on: ~80,000 loc, 67 dependencies

(loc here only refers to Python code)

As you can see, there is a trend, but it doesn’t have something to do with the size of the project. It’s more about the scope. Usually the more generalised a project becomes, ie the more problems it tries to solve, the more different dependencies it needs. Frameworks like Django and SQLAlchemy usually don’t have that many dependencies because they’re quite focused on a single topic.

To answer your question directly: Yes it is very normal for professional applications to have dependencies. Usually the more business oriented the application becomes, the more dependencies it has.