11![ Build] ( https://github.com/Neoteroi/rodi/workflows/Build/badge.svg )
2- [ ![ pypi] ( https://img.shields.io/pypi/v/neoteroi-di .svg )] ( https://pypi.python.org/pypi/neoteroi-di )
3- [ ![ versions] ( https://img.shields.io/pypi/pyversions/neoteroi-di .svg )] ( https://github.com/Neoteroi/neoteroi-di )
2+ [ ![ pypi] ( https://img.shields.io/pypi/v/rodi .svg )] ( https://pypi.python.org/pypi/rodi )
3+ [ ![ versions] ( https://img.shields.io/pypi/pyversions/rodi .svg )] ( https://github.com/Neoteroi/rodi )
44[ ![ codecov] ( https://codecov.io/gh/Neoteroi/rodi/branch/main/graph/badge.svg?token=VzAnusWIZt )] ( https://codecov.io/gh/Neoteroi/rodi )
55[ ![ license] ( https://img.shields.io/github/license/Neoteroi/rodi.svg )] ( https://github.com/Neoteroi/rodi/blob/main/LICENSE )
66
@@ -27,16 +27,12 @@ The `ContainerProtocol` for v2 is inspired by [punq](https://github.com/bobthemi
2727## Installation
2828
2929``` bash
30- pip install neoteroi-di
30+ pip install rodi
3131```
3232
33- ` neoteroi-di ` is the new version of the library that was previously named
34- [ ` rodi ` ] ( https://pypi.org/project/rodi/ ) . It is currently ` alpha ` and still
35- subject to change.
36-
3733## Efficient
3834
39- ` neoteroi-di ` works by inspecting code ** once** at runtime, to generate
35+ ` rodi ` works by inspecting code ** once** at runtime, to generate
4036functions that return instances of desired types - as long as the object graph
4137is not altered. Inspections are done either on constructors
4238(__ _ ;_ ; init_ ;_ ; __ ) or class annotations. Validation steps, for
@@ -46,19 +42,18 @@ activating services.
4642
4743## Flexible
4844
49- ` neoteroi-di ` offers two code APIs:
45+ ` rodi ` offers two code APIs:
5046
5147- one is kept as generic as possible, using a ` ContainerProtocol ` for scenarios
52- in which it is desirable being able to replace ` neoteroi-di ` with alternative
48+ in which it is desirable being able to replace ` rodi ` with alternative
5349 implementations of dependency injection for Python. The protocol only expects
5450 a class being able to ` register ` and ` resolve ` types, and to tell if a type
5551 is configured in it (` __contains__ ` ). Even if other implementations of DI
5652 don´t implement these three methods, it should be easy to use
5753 [ composition] ( https://en.wikipedia.org/wiki/Composition_over_inheritance ) to
5854 wrap other libraries with a compatible class.
59- - one is a more concrete implementation, following the previous implementation
60- in ` rodi ` , for scenarios where it's not desirable to consider alternative
61- implementations of dependency injection.
55+ - one is a more concrete implementation, for scenarios where it's not desirable
56+ to consider alternative implementations of dependency injection.
6257
6358For this reason, the examples report two ways to achieve certain things.
6459
@@ -88,7 +83,7 @@ relying on the HTTP Request object being a service registered in your container.
8883
8984## Usage in BlackSheep
9085
91- ` neoteroi-di ` is used in the second version of [ BlackSheep] ( https://www.neoteroi.dev/blacksheep/ )
86+ ` rodi ` is used in the [ BlackSheep] ( https://www.neoteroi.dev/blacksheep/ )
9287web framework to implement [ dependency injection] ( https://www.neoteroi.dev/blacksheep/dependency-injection/ ) for
9388request handlers.
9489
0 commit comments