{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/9"},{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/10"},{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/6"}],"enrichment":{"capability":"Integrates dependency injection into Flask applications using the Injector framework, allowing you to inject dependencies into views, handlers, and other Flask components without relying on global objects.","skillfed_tags":["dependency-injection","testing-friendly"],"use_cases":["Build testable Flask applications by injecting mock dependencies instead of relying on global Flask objects during unit tests.","Manage database connections, caches, or service clients as request-scoped or singleton dependencies without global initialization.","Integrate Flask extensions through Injector modules instead of the typical global pattern.","Implement class-based views with constructor injection to avoid accessing globals in __init__ methods.","Decouple Flask route handlers from concrete implementations by injecting interfaces or abstract services."],"what_it_does":"Flask-Injector bridges the Injector dependency-injection framework into Flask applications. Instead of using Flask's global objects (like the global request context or extension singletons), you define dependencies in Injector modules and have them automatically injected into views, request handlers, template processors, and other Flask components. This eliminates the need for global state, making applications easier to test and reason about.\n\nThe package works by wrapping Flask's initialization and hooking into its request lifecycle. It binds Flask's core objects (the app, config, and request) into the Injector container at appropriate scopes (singleton for app and config, request-scoped for the current request), then resolves function parameters by type annotation. It integrates with Flask-RESTful, Flask-RestPlus, and Flask-RESTX resource constructors, and supports custom scopes for advanced use cases.","worth_installing":"Yes, with conditions. Flask-Injector is stable and well-suited for new Flask projects that prioritize testability and clean dependency management. However, the dormant maintenance status (last release 2023-07-27) means you should verify compatibility with your target Flask and Injector versions before committing. If your project requires active upstream support or frequent dependency updates, consider whether the risk of stale maintenance is acceptable. For established projects with fixed dependencies, it remains a solid choice."},"id":"flask-injector","links":{"html":"https://skillfed.io/packages/flask-injector","md":"https://skillfed.io/packages/flask-injector.md","pypi":"https://pypi.org/project/flask-injector/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2023-07-27","license_spdx":null,"license_treatment":"permissive","name":"Flask-Injector","python_support":"unspecified","summary":"Adds Injector, a Dependency Injection framework, support to Flask."},"popularity":{"monthly_downloads":106151,"position":12666,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.15.0"}
