Skip to content

Commit 2dca603

Browse files
committed
chore: update readme
1 parent f77572e commit 2dca603

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ A dependency injection library for Python.
1313

1414
## Why py-dependency-injection?
1515

16-
`py-dependency-injection` is inspired by the built-in dependency injection system in **ASP.NET Core**. It provides a lightweight and extensible way to manage dependencies in Python applications. By promoting constructor injection and supporting scoped lifetimes, it encourages clean architecture and makes testable, maintainable code the default.
16+
`py-dependency-injection` is inspired by the built-in dependency injection system in **ASP.NET Core**. It provides a lightweight and extensible way to manage services in Python applications. By promoting constructor injection and supporting scoped lifetimes, it encourages clean architecture and makes testable, maintainable code the default.
1717

1818
This library is implemented in **pure Python** and has **no runtime dependencies**.
1919

2020
## Features
2121

22-
- **Scoped Registrations:** Define the lifetime of your dependencies as transient, scoped, or singleton.
23-
- **Constructor Injection:** Automatically resolve and inject dependencies when creating instances.
24-
- **Method Injection:** Inject dependencies into methods using a simple decorator.
25-
- **Factory Functions:** Register factory functions, classes, or lambdas to create dependencies.
26-
- **Instance Registration:** Register existing instances as dependencies.
27-
- **Tag-Based Registration and Resolution:** Organize and resolve dependencies based on tags.
22+
- **Scoped Registrations:** Define the lifetime of your services as transient, scoped, or singleton.
23+
- **Constructor Injection:** Automatically resolve and inject services when creating instances.
24+
- **Method Injection:** Inject services into methods using a simple decorator.
25+
- **Factory Functions:** Register factory functions, classes, or lambdas to create services.
26+
- **Instance Registration:** Register existing instances as services.
27+
- **Tag-Based Registration and Resolution:** Organize and resolve services based on tags.
2828
- **Multiple Containers:** Support for using multiple dependency containers.
2929

3030
## Compatibility
@@ -66,7 +66,7 @@ class CheckoutService:
6666
def checkout(self):
6767
self._gateway.charge(2000, "USD") # e.g. $20.00
6868

69-
# Get the default dependency container
69+
# Get the default container
7070
container = DependencyContainer.get_instance()
7171

7272
# Register StripeGateway as a singleton (shared for the app's lifetime)
@@ -97,6 +97,8 @@ You can find the source code for `py-dependency-injection` on [GitHub](https://g
9797

9898
### Latest: [1.0.0-rc.3](https://github.com/runemalm/py-dependency-injection/releases/tag/v1.0.0-rc.3) (2025-08-xx)
9999

100+
- **API polish:** Renamed `dependency``service`, `constructor_args``constructor_kwargs`, and `factory_args``factory_kwargs`; old keywords still work but emit deprecation warnings.
101+
- **Documentation**: Enabled copy button for code example blocks.
100102
- **Tooling**: Added test coverage tooling (Codecov).
101103
- **Tests**: Added more unit tests to increase coverage.
102104

0 commit comments

Comments
 (0)