1

I'm following this page to write a micrservice to GET data from a SQLAlchemy model: https://fastapi.tiangolo.com/tutorial/sql-databases/

And my file structure looks like this:

enter image description here

I can't get past this error:

  File "./main.py", line 8, in <module>
    from . import crud, models, schemas
ImportError: attempted relative import with no known parent package

Can anyone clue me in?

The file in question is located here: https://github.com/goterpsgo/ecommerce/blob/decorative_base/srv_users/main.py#L8

TIA,

  • Joe
snakecharmerb
  • 47,570
  • 11
  • 100
  • 153
goterpsgo
  • 307
  • 2
  • 18

0 Answers0