Last active
May 15, 2024 09:33
-
-
Save timvw/a71c222b93c11e7d0d2b0f0b02220ea6 to your computer and use it in GitHub Desktop.
python importlib for modules with keyword in path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
sys.path.append(os.path.join(os.path.dirname(__file__), "..")) | |
models = importlib.import_module("api.lambda.models") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment