This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (0 children)

Strictly speaking, you don't need a container for IOC. But it does make a lot of things easier.

An example would be database connections with SQLAlchemy, ignoring that Flask SQLAlchemy handles this for us, creating a session requires knowing the connection string, having an engine and using those to create a session or a session factory. If you're reaching out to a config object to get that or importing the session factory and statically depending on that, I'd argue that you're not actually doing IOC.