Type-driven dependency injection for Python with fail-fast validation and native integrations for FastAPI, Flask, Django, and more.
Wireup is a type-driven dependency injection library for Python that provides fail-fast validation and explicit lifetime management. It solves the problem of managing complex dependency graphs in Python applications by ensuring correctness at startup and offering seamless integrations with popular web frameworks. The library is designed to be thread-safe, production-ready, and performant, with zero-overhead resolution for singleton dependencies.
Python developers building web applications with frameworks like FastAPI, Django, or Flask, who need a robust, type-safe dependency injection system. It is also suitable for developers working on CLI tools, background workers, or any Python project requiring clean architecture and testable code.
Developers choose Wireup for its fail-fast design, which guarantees that if the container starts, the dependency graph works, eliminating runtime surprises. Its native framework integrations, explicit lifetime controls, and performance optimizations provide a superior alternative to manual wiring or less rigorous DI libraries.
Type-driven dependency injection for Python. Fail-fast validation, explicit lifetimes, native integrations for FastAPI, Flask, Django, and more.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Catches missing dependencies, circular dependencies, and misconfigurations at container startup, preventing runtime surprises as emphasized in the README's philosophy.
Offers native integrations for FastAPI, Django, Flask, and other popular frameworks, enabling consistent dependency management across APIs, CLIs, and workers without rewrite.
Provides zero-overhead resolution for singleton dependencies in frameworks like FastAPI, reducing per-request latency as demonstrated in the benchmarks section.
Allows dependency swapping with context managers via container.override for isolated tests, automatically restoring the original graph without complex setup.
Requires @injectable decorators on all managed classes and functions, adding ceremony compared to implicit or convention-based DI libraries.
Heavily relies on Python type annotations for dependency resolution, which can be a barrier for projects not using type hints or with dynamic code patterns.
Fail-fast validation means any dependency graph changes necessitate container restart, limiting flexibility in environments requiring hot-reload or dynamic updates.