Skip to content

Commit 301b39c

Browse files
committed
refactor: expose lifespan checks
1 parent 402a2d3 commit 301b39c

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

src/stac_auth_proxy/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,12 @@
88

99
from .app import configure_app, create_app
1010
from .config import Settings
11+
from .lifespan import check_conformance, check_server_health
1112

12-
__all__ = ["create_app", "configure_app", "Settings"]
13+
__all__ = [
14+
"create_app",
15+
"configure_app",
16+
"check_conformance",
17+
"check_server_health",
18+
"Settings",
19+
]

src/stac_auth_proxy/lifespan.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"""Public access to lifespan health checks.
2+
3+
This module re-exports the ``check_server_health`` and ``check_conformance``
4+
utilities so that library users can import them without reaching into the
5+
internal ``utils`` package.
6+
"""
7+
8+
from .utils.lifespan import check_conformance, check_server_health
9+
10+
__all__ = ["check_server_health", "check_conformance"]

tests/test_configure_app.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
from fastapi import FastAPI
44
from fastapi.routing import APIRoute
55

6-
from stac_auth_proxy import Settings
7-
from stac_auth_proxy.app import configure_app
6+
from stac_auth_proxy import Settings, configure_app
87

98

109
def test_configure_app_excludes_proxy_route():

tests/test_lifespan.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from starlette.middleware import Middleware
88
from starlette.types import ASGIApp
99

10-
from stac_auth_proxy.utils.lifespan import check_conformance, check_server_health
10+
from stac_auth_proxy import check_conformance, check_server_health
1111
from stac_auth_proxy.utils.middleware import required_conformance
1212

1313

0 commit comments

Comments
 (0)