Fast-depends

Latest version: v2.4.12

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

Scan your dependencies

Page 3 of 5

2.4.0

Waiting for FastStream update to release stable version

**Full Changelog**: https://github.com/Lancetnik/FastDepends/compare/2.3.1...0.2.4b0

2.3.1

Correct `model.flat_params` calculation

**Full Changelog**: https://github.com/Lancetnik/FastDepends/compare/2.3.0...2.3.1

2.3.0

What's Changed

* Multiple `Annotated` arguments support:
python
from typing import Annotated
from annotated_types import Ge
from pydantic.functional_validators import AfterValidator

inject()
def f(a: Annotated[int, Ge(10), AfterValidator(lambda x: x + 10)]) -> int:
return a

assert f(10) == 20

* Support correct Generator annotation
python
inject
def simple_func(a: str) -> Iterator[int]:
for _ in range(2):
yield a

for i in simple_func("1"):
assert i == 1

* solve async dependencies without subdependencies in parallel tasks
* solve `CustomField` with async `use_field` in parallel
* build(deps-dev): bump ruff from 0.1.9 to 0.1.11 by dependabot in https://github.com/Lancetnik/FastDepends/pull/56
* get rid of protected objects by VitailOG in https://github.com/Lancetnik/FastDepends/pull/57
* feat: parallel dependencies resolving by Lancetnik in https://github.com/Lancetnik/FastDepends/pull/58

New Contributors
* VitailOG made their first contribution in https://github.com/Lancetnik/FastDepends/pull/57

**Full Changelog**: https://github.com/Lancetnik/FastDepends/compare/2.2.8...2.3.0

2.2.8

Restore `fast_depends._compat.CreateBaseModel` to save **FastStream**<0.3.7 compatibility

**Full Changelog**: https://github.com/Lancetnik/FastDepends/compare/2.2.7...2.2.8

2.2.7

What's Changed

* bugfix: correct yield overriding by Lancetnik in https://github.com/Lancetnik/FastDepends/pull/50
python
from fast_depends import inject, Depends, dependency_provider

def dep1():
yield 1

def dep2():
yield 2

inject()
def func(d = Depends(dep1)):
return d

assert func() == 1

with dependency_provider.scope(dep1, dep2):
assert func() == 2

* build(deps): bump actions/download-artifact from 3 to 4 by dependabot in https://github.com/Lancetnik/FastDepends/pull/44
* build(deps-dev): bump black from 23.11.0 to 23.12.0 by dependabot in https://github.com/Lancetnik/FastDepends/pull/48
* build(deps-dev): bump isort from 5.13.0 to 5.13.2 by dependabot in https://github.com/Lancetnik/FastDepends/pull/47
* build(deps): bump dawidd6/action-download-artifact from 2.28.0 to 3.0.0 by dependabot in https://github.com/Lancetnik/FastDepends/pull/45
* build(deps-dev): bump ruff from 0.1.7 to 0.1.8 by dependabot in https://github.com/Lancetnik/FastDepends/pull/46
* build(deps): bump actions/upload-artifact from 3 to 4 by dependabot in https://github.com/Lancetnik/FastDepends/pull/43

**Full Changelog**: https://github.com/Lancetnik/FastDepends/compare/2.2.6...2.2.7

2.2.6

What's Changed

Provides you with the ability to setup pydantic config using `inject`

python
inject(pydantic_config={"str_max_length": 8})
def limited_str(a: str):
...

limited_str("*" * 9) raises ValidationError


Also, added context manager method to override dependencies:

python
from fast_depends import Depends, dependency_provider, inject

def base_dep():
return 1

def override_dep():
return 2

inject
def func(d=Depends(base_dep)):
return d

with dependency_provider.scope(base_dep, override_dep):
assert func() == 2

assert func() == 1


* feat (38): add pydantic config option by Lancetnik in https://github.com/Lancetnik/FastDepends/pull/42

**Full Changelog**: https://github.com/Lancetnik/FastDepends/compare/2.2.5...2.2.6

Page 3 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.