A FastAPI project with asyncpg has dependencies from psycopg2, which causes the error ModuleNotFoundError: No module named ‘psycopg2’
I have a FastAPI project that uses asyncpg
to connect to PostgreSQL.
I use poetry
and the following is my pyproject.toml
files.