Files
fastapi-toolsets/src/fastapi_toolsets/_imports.py

10 lines
311 B
Python

"""Optional dependency helpers."""
def require_extra(package: str, extra: str) -> None:
"""Raise *ImportError* with an actionable install instruction."""
raise ImportError(
f"'{package}' is required to use this module. "
f"Install it with: pip install fastapi-toolsets[{extra}]"
)