diff --git a/projects/fal/src/fal/app.py b/projects/fal/src/fal/app.py index 7b41e2dc..de7b8c6f 100644 --- a/projects/fal/src/fal/app.py +++ b/projects/fal/src/fal/app.py @@ -248,6 +248,14 @@ def _to_fal_app_name(name: str) -> str: return "-".join(part.lower() for part in PART_FINDER_RE.findall(name)) +def _print_python_packages() -> None: + from pkg_resources import working_set + + print("Python packages installed:") + for package in working_set: + print(f"{package.key}=={package.version}") + + class App(fal.api.BaseServable): requirements: ClassVar[list[str]] = [] machine_type: ClassVar[str] = "S" @@ -305,6 +313,7 @@ def collect_routes(self) -> dict[RouteSignature, Callable[..., Any]]: @asynccontextmanager async def lifespan(self, app: fastapi.FastAPI): + _print_python_packages() await _call_any_fn(self.setup) try: yield