- Dependency resolving is async by default:
- framework was developed mostly for usage with async python applications;
- sync resolving is also possible, but it will fail in runtime in case of unresolved async dependencies;
- Container is global:
- it's needed for injections without wiring to work;
- this way most of the logic stays in providers;
- Focus on maximum compatibility with mypy:
- no need for
# type: ignore - no need for
typing.cast
- no need for
- The only runtime dependency is
typing-extensions:- it backports
override,Self,TypeIsandTypeVardefaults to Python 3.10; - integrations declare their own imports in extras, and
tests/test_packaging.pychecks both.
- it backports