NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #3240 most downloaded on PyPI
FastDepends - extracted and cleared from HTTP domain logic FastAPI Dependency Injection System. Async and sync are both supported.
Last release 15 days ago
19 Sep 2026
Ships unpredictably
gaps range from 8 days to 8 months
Some releases are documented
notes for 35 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
79 releases · first in 2023
One column per quarter.
fix: type inject(options) and run_async with a coroutine function by @Lancetnik in #299
inject(**options) and run_async with a coroutine function by @Lancetnik in #299Full Changelog: 3.0.8...3.0.9
chore: fix typos by @Lancetnik in #259
build(deps-dev): bump the pip group with 2 updates by @dependabot[bot] in https://github.com/Lancetnik/FastDepends/pull/257
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/3.0.6...3.0.7
Full Changelog: 3.0.6...3.0.7
feat: add exclude option to schema generator by @Lancetnik in https://github.com/Lancetnik/FastDepends/pull/255
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/3.0.5...3.0.6
Full Changelog: 3.0.5...3.0.6
ci: add free-threading tests by @Lancetnik in https://github.com/Lancetnik/FastDepends/pull/238
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/3.0.4...3.0.5
Full Changelog: 3.0.4...3.0.5
Fix clear overrides by @redb0 in https://github.com/Lancetnik/FastDepends/pull/225
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/3.0.3...3.0.4
Full Changelog: 3.0.3...3.0.4
chore: update relator by @Sehat1137 in https://github.com/Lancetnik/FastDepends/pull/221
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/3.0.2...3.0.3
Full Changelog: 3.0.2...3.0.3
ci: install reagento/relator by @Sehat1137 in https://github.com/Lancetnik/FastDepends/pull/219
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/3.0.1...3.0.2
Full Changelog: 3.0.1...3.0.2
fix: support provider[dep] = value override syntax by @Lancetnik in https://github.com/Lancetnik/FastDepends/pull/215
provider[dep] = value override syntax by @Lancetnik in https://github.com/Lancetnik/FastDepends/pull/215Full Changelog: https://github.com/Lancetnik/FastDepends/compare/3.0.0...3.0.1
provider[dep] = value override syntax by @Lancetnik in #215Full Changelog: 3.0.0...3.0.1
Currently you can select the serializer implementation you prefer
Currently you can select the serializer implementation you prefer
from pydantic import Field
from fast_depends import inject
from fast_depends.pydantic import PydanticSerializer
@inject(serializer=PydanticSerializer())
def func(a: list[int] = Field(min_length=1)): ...
from msgspec import field
from fast_depends import inject
from fast_depends.msgspec import MsgSpecSerializer
@inject(serializer_cls=MsgSpecSerializer())
def func(a: list[int] = field(default=[])) -> list[int]:
return a
build.py by @sobolevn in https://github.com/Lancetnik/FastDepends/pull/174Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.4.12...3.0.0
Currently you can select the serializer implementation you prefer
from pydantic import Field
from fast_depends import inject
from fast_depends.pydantic import PydanticSerializer
@inject(serializer=PydanticSerializer())
def func(a: list[int] = Field(min_length=1)): ...from msgspec import field
from fast_depends import inject
from fast_depends.msgspec import MsgSpecSerializer
@inject(serializer_cls=MsgSpecSerializer())
def func(a: list[int] = field(default=[])) -> list[int]:
return abuild.py by @sobolevn in #174Full Changelog: 2.4.12...3.0.0
Nothing published for this version
Currently you can select the serializer implementation you prefer
Currently you can select the serializer implementation you prefer
from pydantic import Field
from fast_depends import inject
from fast_depends.pydantic import PydanticSerializer
@inject(serializer=PydanticSerializer())
def func(a: list[int] = Field(min_length=1)): ...
from msgspec import field
from fast_depends import inject
from fast_depends.msgspec import MsgSpecSerializer
@inject(serializer_cls=MsgSpecSerializer())
def func(a: list[int] = field(default=[])) -> list[int]:
return a
build.py by @sobolevn in https://github.com/Lancetnik/FastDepends/pull/174Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.4.12...3.0.0rc0
Currently you can select the serializer implementation you prefer
from pydantic import Field
from fast_depends import inject
from fast_depends.pydantic import PydanticSerializer
@inject(serializer=PydanticSerializer())
def func(a: list[int] = Field(min_length=1)): ...from msgspec import field
from fast_depends import inject
from fast_depends.msgspec import MsgSpecSerializer
@inject(serializer_cls=MsgSpecSerializer())
def func(a: list[int] = field(default=[])) -> list[int]:
return abuild.py by @sobolevn in #174Full Changelog: 2.4.12...3.0.0rc0
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Add python 3.13 support by @Olegt0rr in https://github.com/Lancetnik/FastDepends/pull/140
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.4.11...2.4.12
fix: Allow to use */ arguments with non-standard names by @Zhenay in https://github.com/Lancetnik/FastDepends/pull/127
*/** arguments with non-standard names by @Zhenay in https://github.com/Lancetnik/FastDepends/pull/127Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.4.10...2.4.11
fix: Allow to inject async functions into functions wrapped with asynccontextmanager by @Zhenay in https://github.com/Lancetnik/FastDepends/pull/125
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.4.9...2.4.10
fix: Allow to inject async functions into async generators by @Zhenay in https://github.com/Lancetnik/FastDepends/pull/124
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.4.8...2.4.9
feat: annotated_types with CustomField support by @Lancetnik in https://github.com/Lancetnik/FastDepends/pull/120
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.4.7...2.4.8
fix bug #115 by @Cooh12 in https://github.com/Lancetnik/FastDepends/pull/117
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.4.6...2.4.7
fix (#112): correct CustomFields mapping to positional args by @Lancetnik in https://github.com/Lancetnik/FastDepends/pull/113
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.4.5...2.4.6
Now CustomField respects function default value at required=False case
Now CustomField respects function default value at required=False case
from typing_extensions import Annotated
from fast_depends import inject
from fast_depends.library import CustomField
@inject
def func(
a: Annotated[int, CustomField(cast=False, required=False)] = 1
):
assert a == 1 # `a` was `None` before
func()
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.4.4...2.4.5
Use globals of original(wrapped) function by @yuyupopo in https://github.com/Lancetnik/FastDepends/pull/97
Annotated[..., CustomField()] reusageFull Changelog: https://github.com/Lancetnik/FastDepends/compare/2.4.3...2.4.4
fix: fix 4.12.0 typing extensions error with pydantic by @Lancetnik in https://github.com/Lancetnik/FastDepends/pull/93
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.4.2...2.4.3
build(deps): bump dawidd6/action-download-artifact from 3.1.1 to 3.1.2 by @dependabot in https://github.com/Lancetnik/FastDepends/pull/74
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.4.1...2.4.2
chore: remove optional dependencies, fix typos by @Lancetnik in https://github.com/Lancetnik/FastDepends/pull/73
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.4.0...2.4.1
Add fast_depends.shema.get_schema method to generate wrapped function payload (close https://github.com/Lancetnik/FastDepends/issues/6)
fast_depends.shema.get_schema method to generate wrapped function payload (close https://github.com/Lancetnik/FastDepends/issues/6)ForwardRef resolutionFull Changelog: https://github.com/Lancetnik/FastDepends/compare/2.3.1...0.2.4
Nothing published for this version
Correct model.flat_params calculation
Correct model.flat_params calculation
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.3.0...2.3.1
Multiple Annotated arguments support: ```python from typing import Annotated from annotated_types import Ge from pydantic.functional_validators import
Annotated arguments support: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
@inject
def simple_func(a: str) -> Iterator[int]:
for _ in range(2):
yield a
for i in simple_func("1"):
assert i == 1
CustomField with async use_field in parallelFull Changelog: https://github.com/Lancetnik/FastDepends/compare/2.2.8...2.3.0
Restore fast_depends._compat.CreateBaseModel to save FastStream<0.3.7 compatibility
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
bugfix: correct yield overriding by @Lancetnik in https://github.com/Lancetnik/FastDepends/pull/50 ```python from fast_depends import inject, Depends,
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
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.2.6...2.2.7
Provides you with the ability to setup pydantic config using @inject
Provides you with the ability to setup pydantic config using @inject
@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:
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
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.2.5...2.2.6
New CustomField syntax to support classes injection:
New CustomField syntax to support classes injection:
class Header(CustomField):
def use(
self,
/, # <- new thing
**kwargs
):
kwargs = super().use(**kwargs)
kwargs[self.param_name] = kwargs["headers"][self.param_name]
return kwargs
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.2.4...2.2.5
Now you can use FastDepends to inject dependencies to your class constructors and/or methods!
Now you can use FastDepends to inject dependencies to your class constructors and/or methods!
from fast_depends import Depends, inject
def get_var():
return 1
class Class:
@inject
def __init__(self, a = Depends(get_var)) -> None:
self.a = a
@inject
def calc(self, a = Depends(get_var)) -> int:
return a + self.a
assert Class().calc() == 2
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.2.3...2.2.4
chore: downloads/month badge by @Lancetnik in https://github.com/Lancetnik/FastDepends/pull/14
Full Changelog: https://github.com/Lancetnik/FastDepends/compare/2.2.0...2.2.3
Nothing published for this version
Nothing published for this version
With this release, async and sync generator function support was added!
With this release, async and sync generator function support was added!
This case supports incoming and return types casting both
from fast_depends import inject
@inject
def func(a: str) -> int:
for _ in range(3)
yield a
for i in func(1):
assert i == "1"
Also, @inject has an option to disable pydantic validation with cast=False. This way Depends and your custom fields are still working, but pydantic is not even called.
from fast_depends import inject
@inject(cast=False)
def func(a: str) -> int:
return a
assert func(1.0) == 1.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Now the package is able to validate not only a final decraled fields, but also an *args, kwargs too!
Now the package is able to validate not only a final decraled fields, but also an *args, **kwargs too!
@inject
def simple_func(
a: int,
*args: Tuple[float, ...],
b: int,
**kwargs: Dict[str, int],
):
...
This way, the all function variaty is supported
Your coding agent can read these notes before it upgrades. Set up the MCP server →