My folder structure looks like below
.
└── myfolder/
└── mock/
├── __init__.py
└── main.py
└── common/
├── __init__.py
└── db.py
└── routers
└── myroute.py
└── __init__.py
My main.py
from fastapi import FastAPI
from ..common.db import create_db_and_tables
from ..common.routers import myroute
app = FastAPI()
app.include_router(myroute.router)
Now from inside of mock
if I run the main.py
, I am getting python ImportError: attempted relative import with no known parent package
.
I am not sure whats I am missing here