Releases: Feverup/pypendency
Releases · Feverup/pypendency
v0.5.0
v0.4.0
New functionality added in Container class.
- callbacks for on_resolved_container: You can add multiple callable functions to the container that will be triggered after the container is resolved.
New container class method:
- add_on_resolved_callback(func: OnContainerResolvedCallable) -> None
New type alias for callables: OnContainerResolvedCallable = Callable[[], None]
v0.3.0
Create the public Tags API.
- Add Tag class
- Changes to the Container API:
set
now takes an extra, optional argument for the tags:set(identifier: str, service: object, tags: Optional[Set[Tag]] = None) -> None
- Tags of a service can be retrieved through the service's identifier:
get_service_tags(service_identifier: str) -> Set[Tag]
- A set of services can be retrieved through their tags:
get_by_tag(tag: Tag) -> Set[object]
get_by_tag_name(tag_identifier: str, tag_value: Optional[object] = Tag.UNSET_VALUE) -> Set[object]
- Tags can also be specified through
yaml
:
example.tagged_A:
fqn: 'tests.resources.class_a.A'
args:
- '@example.A'
kwargs:
kw_arg: 'test_param'
b: '@example.B'
tags:
test_tag_identifier: 'test_tag_value'
another_test_tag_identifier: # empty evaluates to null
yet_another_tag: 1