-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refact: use file streaming and DRS resolver from bento_lib v12
- Loading branch information
1 parent
6ec586c
commit 1762b03
Showing
10 changed files
with
381 additions
and
380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from bento_lib.drs.resolver import DrsResolver | ||
from fastapi import Depends | ||
from functools import lru_cache | ||
from typing import Annotated | ||
|
||
from .config import ConfigDependency | ||
|
||
__all__ = [ | ||
"get_drs_resolver", | ||
"DrsResolverDependency", | ||
] | ||
|
||
|
||
@lru_cache | ||
def get_drs_resolver(config: ConfigDependency): | ||
return DrsResolver(cache_ttl=config.drs_cache_ttl) | ||
|
||
|
||
DrsResolverDependency = Annotated[DrsResolver, Depends(get_drs_resolver)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.