awesome-repositories.com
المدونة
awesome-repositories.com

اكتشف أفضل مستودعات المصادر المفتوحة باستخدام بحث مدعوم بالذكاء الاصطناعي.

استكشفعمليات بحث منسقةبدائل مفتوحة المصدربرمجيات ذاتية الاستضافةالمدونةخريطة الموقع
المشروعحولكيفية ترتيب النتائجالصحافةخادم MCP
قانونيالخصوصيةالشروط
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
ets-labs avatar

ets-labs/python-dependency-injector

0
View on GitHub↗
4,805 نجوم·344 تفرعات·Python·bsd-3-clause·3 مشاهداتpython-dependency-injector.ets-labs.org↗

Python Dependency Injector

This is a dependency injection framework and inversion of control container for Python. It decouples object creation from business logic by managing how services and their dependencies are assembled, delivered, and linked within an application.

The framework is distinguished by its ability to perform automated component wiring, using import hooks and decorators to inject dependencies into functions and classes across different modules. It supports non-blocking flows through an asynchronous dependency resolver and manages the initialization and shutdown sequences of shared external resources as a resource lifecycle manager.

It provides a comprehensive suite of provider types, including singletons, factories, and placeholders, to control object lifetimes and assembly. The system includes capabilities for application configuration management via YAML, JSON, and environment variables, as well as tools for software test isolation through runtime dependency overriding.

Integration utilities are available for bridging managed dependencies into web frameworks, ASGI lifecycles, and event handlers.

Features

  • Dependency Injection - Provides a comprehensive framework for managing object lifecycles and decoupling components through dependency injection.
  • Automated Dependency Wiring - Installs a module loader hook to automatically resolve and wire dependencies when modules are imported into the application.
  • Declarative Registries - Organizes dependency providers as class attributes to decouple object creation from business logic.
  • Asynchronous Dependencies - Resolves dependencies using awaitables to support non-blocking initialization and shutdown of shared resources.
  • Dependency Wiring Hooks - Installs a module loader hook to automatically resolve and inject dependencies when modules are imported.
  • Automated Component Wiring - Injects dependencies into functions and classes across modules without manually passing objects through every layer.
  • Dependency Injection Containers - Defines the assembly of services and their dependencies in a central container to decouple object creation from usage.
  • Callable Wiring - Binds container providers to functions or methods across different modules and packages using decorators.
  • Component Wiring - Aggregates multiple package containers into a single application container to resolve dependencies and connect decoupled modules.
  • Structured Provider Containers - Organizes providers as class attributes to create a structured, reusable assembly of dependencies.
  • Dependency Injection Frameworks - Implements inversion of control to manage component dependencies and object lifecycles in Python.
  • Automatic Constructor Injection - Supplies required objects to functions or classes at runtime using markers to eliminate manual instantiation.
  • Dynamic Dependency Overriding - Replaces a provider with another implementation at runtime to facilitate testing with stubs.
  • Factory-Based Instantiation - Creates new object instances by injecting defined dependencies or assigning attributes during initialization.
  • Object Assembly Management - Manages the assembly and linking of objects using diverse provider types to handle complex dependency graphs.
  • Object Lifecycle Management - Manages object instantiation through specific provider types like singletons, factories, and asynchronous coroutines.
  • External Resource Initialization - Manages the setup and teardown of shared external resources, such as connection pools, and injects them into dependent services.
  • Asynchronous Providers - Resolves dependencies asynchronously using await expressions to handle non-blocking object initialization.
  • Inversion-of-Control Containers - Provides a central registry for defining object instantiation and linkage to manage complex dependency graphs.
  • Object Lifetime Management - Controls whether a dependency is created as a new instance every time or as a single shared instance.
  • Resource Lifecycle Managers - Handles the initialization and shutdown of shared components using functions, context managers, or asynchronous initializers.
  • Shared Resource Lifecycles - Coordinates the initialization and shutdown sequences of shared external resources and singletons.
  • Service Instance Managers - Implements singleton management to ensure a single instance of a dependency is returned on all requests.
  • Dependency Mocking - Replaces production dependencies with mocks or alternative implementations during test execution to isolate the system.
  • Execution Scope Resource Management - Initializes and configures shared resources like logging, event loops, or thread pools for specific execution scopes.
  • Scope-Based Resource Cleanup - Provides automated initialization and shutdown of resources when functions are called via function wiring.
  • Dynamic Provider Switching - Selects between different provider implementations at runtime based on a specific configuration value.
  • Configuration Merging - Combines settings from multiple external sources like YAML, JSON, and environment variables into a unified registry.
  • Multi-Container Organization - Allows distributing object assembly across multiple declarative containers to manage complexity in large applications.
  • Package Dependency Decoupling - Defines external dependencies within a package container using placeholders to maintain implementation agnosticism.
  • Provider Lifecycle Management - Manages the reset of singleton instances and copying of container states to control object instantiation.
  • String-Based Class Import - Resolves and instantiates objects using absolute or relative module path strings instead of direct class references.
  • Dependency Argument Injection - Binds a specific function or callable object to a dependency to pass it into other services.
  • Dependency Injection Hooks - Implements import hooks to automatically wire containers to modules as they are dynamically imported.
  • Dependency Placeholders - Uses abstract placeholders to define required dependencies that must be concrete implementations before application assembly.
  • Application Configuration - Loads and injects settings from environment variables, YAML, JSON, or INI files into application components.
  • Callable-Based Resolution - Resolves and provides objects by calling a function or class with specified positional and keyword arguments.
  • Module-Level Injection - Wires specific modules to a container to inject dependencies directly into functions or endpoints.
  • Resolution Verification - Checks if all dependencies in a container are defined or have defaults and raises an error if unresolved.
  • Schema-Based Container Initialization - Builds dependency providers automatically using definitions provided in JSON or YAML schema files.
  • Abstract Dependency Definitions - Creates placeholder factories for base classes that must be overridden with concrete implementations.
  • Dependency Placeholders - Creates placeholders for required objects to ensure provided instances match a specified type.
  • Provider Definition Inheritance - Enables extending existing containers to inherit and reuse dependency definitions while specializing new providers.
  • Provider Delegation - Enables injecting a provider instead of the created object, allowing components to produce new instances on demand.
  • Provider Grouping - Groups several factories under a single provider and selects the active one based on a runtime key.
  • Static Object Injection - Provides mechanisms to inject pre-defined objects or constant values exactly as they are into the dependency graph.
  • Dynamic Assembly Configurations - Provides the ability to determine application structure at runtime via configuration files or external data.
  • Runtime Configuration Overrides - Replaces registered provider implementations at execution time to facilitate mocking and environment-specific configuration.
  • Test Isolation - Allows replacing production service implementations with mocks or stubs during testing to isolate components.
  • Request Context Management - Creates singletons scoped to specific execution contexts to ensure separate instances for each request.
  • Web Framework Integrations - Passes request-scoped resources into handlers, views, and endpoints of web frameworks to simplify dependency management.
  • General Utilities - Framework for managing dependency injection in Python.

سجل النجوم

مخطط تاريخ النجوم لـ ets-labs/python-dependency-injectorمخطط تاريخ النجوم لـ ets-labs/python-dependency-injector

بحث بالذكاء الاصطناعي

استكشف المزيد من المستودعات الرائعة

صف ما تحتاجه بلغة بسيطة — وسيقوم الذكاء الاصطناعي بترتيب آلاف المشاريع مفتوحة المصدر المنسقة حسب الصلة.

Start searching with AI

بدائل مفتوحة المصدر لـ Python Dependency Injector

مشاريع مفتوحة المصدر مشابهة، مرتبة حسب عدد الميزات المشتركة مع Python Dependency Injector.
  • jeffijoe/awilixالصورة الرمزية لـ jeffijoe

    jeffijoe/awilix

    4,088عرض على GitHub↗

    Awilix is a JavaScript dependency injection framework and inversion of control container. It provides a centralized system for registering and resolving services, decoupling application components by automating how dependencies are created and passed to the functions or classes that require them. The framework features an automatic module loader that scans the filesystem using glob patterns to register dependencies based on filenames and exports. It supports parameter-name-based injection and proxy-based resolution to manage how dependencies are delivered to constructors and functions. The s

    TypeScriptawilixdependency-injectionioc
    عرض على GitHub↗4,088
  • php-di/php-diالصورة الرمزية لـ PHP-DI

    PHP-DI/PHP-DI

    2,773عرض على GitHub↗

    PHP-DI is an inversion of control container designed to manage object lifecycles and dependency resolution within PHP applications. It functions as a centralized registry that automates the wiring of components, allowing for the decoupling of services from their concrete implementations. The library distinguishes itself by utilizing reflection to inspect class constructor signatures, enabling automatic dependency injection without requiring manual configuration for standard scenarios. It supports recursive resolution of dependency graphs and provides mechanisms for lazy object instantiation,

    PHPcontainer-interopdependency-injectionioc
    عرض على GitHub↗2,773
  • typestack/typediالصورة الرمزية لـ typestack

    typestack/typedi

    4,242عرض على GitHub↗

    TypeDI is a TypeScript dependency injection container and inversion of control tool. It functions as a centralized registry and service locator that manages object instantiation and decouples component dependencies using type inference and decorators. The project provides scoped dependency management to isolate service instances within specific contexts, preventing data leakage between different execution flows. It supports flexible service resolution through the use of type-safe tokens and the ability to map unique identifiers or class constructors to specific service instances. The contain

    TypeScriptdependency-injectioninversion-of-controlioc
    عرض على GitHub↗4,242
  • autofac/autofacالصورة الرمزية لـ autofac

    autofac/Autofac

    4,649عرض على GitHub↗

    Autofac is a dependency injection framework and inversion of control container for .NET. It functions as a component registration engine that decouples class implementations from their dependencies by injecting required services via constructors or properties. The project includes an assembly scanning library to automatically discover and register components within compiled binaries based on specific type criteria. It provides a service lifetime manager to control object memory duration using singletons, instance-per-dependency, or isolated request scopes. The framework covers a broad range

    C#autofacc-sharpdependency-injection
    عرض على GitHub↗4,649
عرض جميع البدائل الـ 30 لـ Python Dependency Injector→

الأسئلة الشائعة

ما هي وظيفة ets-labs/python-dependency-injector؟

This is a dependency injection framework and inversion of control container for Python. It decouples object creation from business logic by managing how services and their dependencies are assembled, delivered, and linked within an application.

ما هي الميزات الرئيسية لـ ets-labs/python-dependency-injector؟

الميزات الرئيسية لـ ets-labs/python-dependency-injector هي: Dependency Injection, Automated Dependency Wiring, Declarative Registries, Asynchronous Dependencies, Dependency Wiring Hooks, Automated Component Wiring, Dependency Injection Containers, Callable Wiring.

ما هي البدائل مفتوحة المصدر لـ ets-labs/python-dependency-injector؟

تشمل البدائل مفتوحة المصدر لـ ets-labs/python-dependency-injector: jeffijoe/awilix — Awilix is a JavaScript dependency injection framework and inversion of control container. It provides a centralized… php-di/php-di — PHP-DI is an inversion of control container designed to manage object lifecycles and dependency resolution within PHP… typestack/typedi — TypeDI is a TypeScript dependency injection container and inversion of control tool. It functions as a centralized… autofac/autofac — Autofac is a dependency injection framework and inversion of control container for .NET. It functions as a component… derekyrc/mini-spring — mini-spring is a Java dependency injection framework and inversion of control container. It manages the full lifecycle… fuzhengwei/small-spring — Small-Spring is a simplified Java implementation of the Spring framework designed to study the internal architecture…