modern-pythonmodern-pythonOfficialยท1 Agent Skills Included

that-depends

Typed dependency injection for Python applications

Manages dependency injection in Python projects with typed containers, providers, and scopes. Eliminates manual wiring, global state, and fragile monkey-patching in tests. Integrates directly with FastAPI, FastStream, and Litestar, and supports safe provider overrides for faster, cleaner testing.
npx skills add modern-python/that-depends --all -g -y

All Skills in This Repository (1)

Pure Emerald Level Indicators

Frequently Asked Questions

FAQPage Schema
How to install that-depends?โ–ผ

Run `npx skills add modern-python/that-depends --all -g -y` in your terminal to install this skill globally.

What is that-depends used for?โ–ผ

It is a typed dependency injection framework for Python that lets you register providers on containers and inject them into functions with @inject and Provide.

Does that-depends work with FastAPI?โ–ผ

Yes. It has built-in integrations for FastAPI, FastStream, and Litestar, so dependencies flow directly into your route handlers.

How do I mock dependencies in tests with that-depends?โ–ผ

Use the provider override APIs, such as override_context_sync, to swap in fakes during tests instead of patching call sites.

Is that-depends suitable for async Python code?โ–ผ

Yes. It is async-first, supports async factories and resources, and manages scoped context for async applications.

Related Repositories in Software Engineering

View All in Software Engineeringโ†’