Ivan
01/20/2025, 8:47 AMMarvin
01/20/2025, 8:47 AMflows
and integrations
is in your Python path. Here's a concise way to import your class:
1. Ensure the Parent Directory is in the PYTHONPATH: You can do this by setting the PYTHONPATH
environment variable or by modifying sys.path
within your script.
2. Import Statement: If the parent directory is correctly set in the path, your import statement in google_flow.py
should look like this:
python
from integrations.api.google import YourClassName
3. Check __init__.py
Files: You've mentioned having __init__.py
files, which is good. Make sure they are present in both flows
and integrations
directories to mark them as packages.
If you are running your script from the command line, you can temporarily add the parent directory to the PYTHONPATH
like this:
bash
PYTHONPATH='..' python flows/google_flow.py
This assumes you are in the directory containing both flows
and integrations
.
If you're still facing issues, please ensure that your working directory is set correctly, and the paths are as expected when running the script.