I think in general the sqlalchemy.create_engine needs to be revised. To get it working for me I used:
engine = sqlalchemy.create_engine(f`postgresql://{config.user}:{config.password}@{config.host}/{config.dbname}`, echo=False)
Then I added user, password and host to the config file.
Might also be worth refactoring the engine creation and session execution out into a separate function since it's included in multiple functions and is always the same (that I've seen so far)