mirror of
https://github.com/d3vyce/fastapi-toolsets.git
synced 2026-03-01 17:00:48 +01:00
10 lines
311 B
Python
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}]"
|
|
)
|