Skip to content

Commit d5acee2

Browse files
committed
Bump to version 1.0.0-alpha.6. Update README and add release notes.0
1 parent 19dd095 commit d5acee2

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,23 @@ dependency_container.register_transient(
6767
SomeClass,
6868
constructor_args={"arg1": value1, "arg2": value2}
6969
)
70+
71+
# Registering dependencies with a factory
72+
dependency_container.register_factory(
73+
SomeInterface,
74+
lambda: SomeClass(arg1=value1, arg2=value2)
75+
)
76+
77+
# Registering dependencies with an instance
78+
instance = SomeClass(arg1=value1, arg2=value2)
79+
dependency_container.register_instance(SomeInterface, instance)
80+
81+
# Registering dependencies with tags
82+
dependency_container.register_transient(
83+
SomeInterface,
84+
SomeClass,
85+
tags={SomeAdjective, AnotherAdjective}
86+
)
7087
```
7188

7289
### Resolving dependencies using the container
@@ -80,6 +97,9 @@ scoped_instance = dependency_container.resolve(AnotherInterface, scope_name="som
8097

8198
# Resolve singleton instance (consistent across the entire application).
8299
singleton_instance = dependency_container.resolve(ThirdInterface)
100+
101+
# Resolve all instances with a specific tag
102+
tagged_instances = dependency_container.resolve_all(tags={SomeAdjective})
83103
```
84104

85105
### Constructor injection
@@ -146,6 +166,12 @@ To contribute, create a pull request on the develop branch following the [git fl
146166

147167
## Release Notes
148168

169+
### [1.0.0-alpha.6](https://github.com/runemalm/py-dependency-injection/releases/tag/v1.0.0-alpha.6) (2024-03-23)
170+
171+
- **Factory Registration:** Added support for registering dependencies using factory functions for dynamic instantiation.
172+
- **Instance Registration:** Enabled registering existing instances as dependencies.
173+
- **Tag-based Registration and Resolution:** Introduced the ability to register and resolve dependencies using tags for flexible dependency management.
174+
149175
### [1.0.0-alpha.5](https://github.com/runemalm/py-dependency-injection/releases/tag/v1.0.0-alpha.5) (2024-03-03)
150176

151177
- **Critical Package Integrity Fix**: This release addresses a critical issue that affected the packaging of the Python library in all previous alpha releases (1.0.0-alpha.1 to 1.0.0-alpha.4). The problem involved missing source files in the distribution, rendering the library incomplete and non-functional.

docs/versionhistory.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
Version history
33
###############
44

5+
**1.0.0-alpha.6 (2024-03-23)**
6+
7+
- **Factory Registration:** Added support for registering dependencies using factory functions for dynamic instantiation.
8+
9+
- **Instance Registration:** Enabled registering existing instances as dependencies.
10+
11+
- **Tag-based Registration and Resolution:** Introduced the ability to register and resolve dependencies using tags for flexible dependency management.
12+
13+
`View release on GitHub <https://github.com/runemalm/py-dependency-injection/releases/tag/v1.0.0-alpha.6>`_
14+
515
**1.0.0-alpha.5 (2024-03-03)**
616

717
- **Critical Package Integrity Fix**: This release addresses a critical issue that affected the packaging of the Python library in all previous alpha releases (1.0.0-alpha.1 to 1.0.0-alpha.4). The problem involved missing source files in the distribution, rendering the library incomplete and non-functional.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setup(
88
name='py-dependency-injection',
9-
version='1.0.0-alpha.5',
9+
version='1.0.0-alpha.6',
1010
author='David Runemalm, 2024',
1111
author_email='david.runemalm@gmail.com',
1212
description=

0 commit comments

Comments
 (0)