Skip to content

Commit

Permalink
add response types, mostly none
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Howley <howley.robert@gmail.com>
  • Loading branch information
robhowley committed Oct 30, 2024
1 parent 1981a87 commit 720b6bf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sdk/python/feast/feature_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ async def lifespan(app: FastAPI):
"/get-online-features",
dependencies=[Depends(inject_user_details)],
)
async def get_online_features(request: GetOnlineFeaturesRequest):
async def get_online_features(request: GetOnlineFeaturesRequest) -> Dict[str, Any]:
# Initialize parameters for FeatureStore.get_online_features(...) call
if request.feature_service:
feature_service = store.get_feature_service(
Expand Down Expand Up @@ -167,7 +167,7 @@ async def get_online_features(request: GetOnlineFeaturesRequest):
)

@app.post("/push", dependencies=[Depends(inject_user_details)])
async def push(request: PushFeaturesRequest):
async def push(request: PushFeaturesRequest) -> None:
df = pd.DataFrame(request.df)
actions = []
if request.to == "offline":
Expand Down Expand Up @@ -219,7 +219,7 @@ async def push(request: PushFeaturesRequest):
store.push(**push_params)

@app.post("/write-to-online-store", dependencies=[Depends(inject_user_details)])
def write_to_online_store(request: WriteToFeatureStoreRequest):
def write_to_online_store(request: WriteToFeatureStoreRequest) -> None:
df = pd.DataFrame(request.df)
feature_view_name = request.feature_view_name
allow_registry_cache = request.allow_registry_cache
Expand Down Expand Up @@ -248,7 +248,7 @@ async def health():
)

@app.post("/materialize", dependencies=[Depends(inject_user_details)])
def materialize(request: MaterializeRequest):
def materialize(request: MaterializeRequest) -> None:
for feature_view in request.feature_views or []:
# TODO: receives a str for resource but isn't in the Union. is str actually allowed?
assert_permissions(
Expand All @@ -262,7 +262,7 @@ def materialize(request: MaterializeRequest):
)

@app.post("/materialize-incremental", dependencies=[Depends(inject_user_details)])
def materialize_incremental(request: MaterializeIncrementalRequest):
def materialize_incremental(request: MaterializeIncrementalRequest) -> None:
for feature_view in request.feature_views or []:
# TODO: receives a str for resource but isn't in the Union. is str actually allowed?
assert_permissions(
Expand Down

0 comments on commit 720b6bf

Please sign in to comment.