I use this, and testing.postgresql for unit testing my api servers with barely any mocks used at all.
https://testcontainers-python.readthedocs.io/en/latest/