Skip to content

Releases: Lancetnik/FastDepends

2.2.3

14 Nov 15:25
6f5abd1
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 2.2.0...2.2.3

2.2.0 (2023-09-22) Generators support

22 Sep 16:51
Compare
Choose a tag to compare

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

2.1.0 (2023-07-17) Args and Kwargs supporting

17 Jul 17:27
Compare
Choose a tag to compare

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

2.0.1 (2023-06-21) PydanticV2 stable

21 Jun 19:05
Compare
Choose a tag to compare

Stable and fulltested PydanticV2 and PydanticV1 both supporting!

2.0.0b (2023-06-19) PydanticV2

19 Jun 19:42
Compare
Choose a tag to compare

It is a totally new package with the same testcases and public interfaces!
It works with pydanticV1 and pydanticV2.0b3 both, so you can easy migrate to beta pydanticV2 Rust version and increase performance by 2-50x!

1.1.0 (2023-04-18)

18 Apr 17:47
Compare
Choose a tag to compare

Custom Field is here!

Now you are able to create your own Header, Path, BackgroundTasks or anything you wish fields with a custom behavior.
Take a look at the docs for details.

(2023-04-16) INITIAL

16 Apr 07:46
Compare
Choose a tag to compare

Inial release

Includes:

  • Depends class with nesting
  • incoming and returning arguments type casting
  • async and sync code supporting

Release is 100% tested, all actual by 0.95.0 FastAPI version features are supported.

Just download and enjoy this package.

Full Changelog: https://github.com/Lancetnik/FastDepends/commits/1.0.0