Releases: BradLewis/simple-injection
Releases · BradLewis/simple-injection
v0.2.5
Release 0.2.4
- Improving error messages when a service fails to resolve. It will now inform you of the service that failed the resolution, and what dependencies it has that caused the error.
- Added support for optional arguments. Now if you have a class such as
class HasOptional:
def __init__(self, optional_dependency: Optional[Dependency] = None):
pass
and you request the service HasOptional
from the collection, it will try to resolve it as Dependency
. If Dependency
has not been declared in the collection, it will use None
instead.
Release 0.2.3
- Improving some typing values
- Improving documentation
Release 0.2.2
Mostly a documentation release
- Adding readme, improving documentation, and adding docs
- Changed behaviour when adding another service with same type. Will now use the last service added when requesting service from the collection.
Release 0.2.1
Added ability to inject multiple services of same base type. When using the multiple services, simple use the typing List[BaseService]
and each all implementations will be passed in order as a list.
Initial release of simple-injection
The initial release for simple-injection
- Initial release includes transient, singleton and instance services.
- Support for resolving an defined service, and can resolve and run a function.