Dimi

Latest version: v1.4.0

Safety actively analyzes 723217 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.4.0

**New Features:**

* `di.inject` now explicitly sets `__signature__` attribute of the underlying func. This new signature contains all the original function params except those having `Annotated[...] type hint`.

Example:
python
di.inject
def func(p1: int, p2: Annnotated[str, some_dependency]): ...

assert inspect.signature(func).parameters.keys() == {"p1"}

1.3.0

**New Features:**
* Clear cache for cached values in case of override
* `add_return_alias` option was added to `di.dependency`

1.2.0

**New Features:**
* Postponed syntax now is available for `__getitem__` as well: `di["some_dependency"]`

1.1.3

**Bug Fixes:**
* Proper handling of non-type types (e.g. `typing.Callable` or generics like `SomeType[int]`) within `typing.Annotated`

1.1.2

**Bug Fixes:**
* Better handling of postponed annotations
* Raising descriptive error in case of dependencies with the same name

1.1.1

**Bug Fixes:**
* Fix handling of postponed annotations

Page 1 of 2

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.