Skip to content

Commit

Permalink
Add startup/shutdown to options
Browse files Browse the repository at this point in the history
  • Loading branch information
EvieePy committed Apr 13, 2024
1 parent c67774f commit 15a5fff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion starlette_plus/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import asyncio
import inspect
import logging
from collections.abc import Callable, Iterator
from collections.abc import Callable, Coroutine, Iterator
from typing import TYPE_CHECKING, Any, Self, TypeAlias, TypedDict, Unpack

from starlette.applications import Starlette
Expand Down Expand Up @@ -47,6 +47,8 @@ class ApplicationOptions(TypedDict, total=False):
views: list[View]
access_log: bool
middleware: list[Middleware]
on_startup: list[Callable[[], Coroutine[Any, Any, None]]]
on_shutdown: list[Callable[[], Coroutine[Any, Any, None]]]


__all__ = ("Application", "View", "route", "limit")
Expand Down

0 comments on commit 15a5fff

Please sign in to comment.