FastAPI pattern works very well with Pgbouncer, when it is in transaction pool mode.
Your Python application maintains a connection to Pgbouncer during the lifecycle of the request, but the physical Postgres connection is allocated only during the DB transaction. You will need open/close transactions in your code though.