You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add dependency-injector Container Support (#21)
* Add Dependency Injector CQRS Container and Update Configuration
- Introduced `DependencyInjectorCQRSContainer` to bridge dependency-injector with CQRS framework, enabling type-based dependency resolution.
- Updated `pyproject.toml` to include new dependencies: `dependency-injector` and `requests`.
- Enhanced `setup_mediator` and `bootstrap` functions to support both `di` and `ICQRSContainer` types.
- Added tests for the new container functionality, covering attachment, resolution strategies, and error handling.
- Updated `.gitignore` to exclude `uv.lock` file.
* Refactor Dependency Injector Logic in CQRS Container
- Replaced `isclass` import with `inspect` for improved clarity and consistency.
- Enhanced provider mapping to support both class-based and function-based providers, ensuring proper type resolution for return types.
- Streamlined the logic for checking provider attributes and their types.
* Update pyproject.toml and Add Dependency Injector Examples
- Updated version in `pyproject.toml` from 4.0.0 to 4.1.0.
- Added new examples demonstrating integration of `dependency-injector` with the CQRS framework, including practical and simple use cases.
- Enhanced `pyproject.toml` with additional dependencies.