mirror of
https://github.com/FutureOfMedTech-FITM-hack/backend.git
synced 2024-12-01 18:33:44 +03:00
16 lines
402 B
Python
16 lines
402 B
Python
"""loads all models from models folder"""
|
|
|
|
import pkgutil
|
|
from pathlib import Path
|
|
|
|
|
|
def load_all_models() -> None:
|
|
"""Load all models from this folder."""
|
|
package_dir = Path(__file__).resolve().parent
|
|
modules = pkgutil.walk_packages(
|
|
path=[str(package_dir)],
|
|
prefix="med_backend.db.models.",
|
|
)
|
|
for module in modules:
|
|
__import__(module.name) # noqa: WPS421
|