Skip to content

Releases: BradLewis/simple-injection

v0.2.5

31 Mar 22:28
Compare
Choose a tag to compare

Added a flag auto_resolve to the ServiceCollection. If true, services that have not been added to the collection will be added automatically when trying to resolve them.

Release 0.2.4

21 Oct 20:50
Compare
Choose a tag to compare
  • 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

22 Sep 19:47
a6c6081
Compare
Choose a tag to compare
  • Improving some typing values
  • Improving documentation

Release 0.2.2

16 Sep 02:47
83c6f6c
Compare
Choose a tag to compare

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

15 Sep 18:05
55e1744
Compare
Choose a tag to compare

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

14 Sep 17:28
Compare
Choose a tag to compare

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.