Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was intrigued to see that they have PyPI packages for a ton of different things - like https://pypi.org/project/testcontainers-postgres

That wheel file is only 2.9KB, so I grabbed a copy to see how it works. I've put the contents in a Gist here: https://gist.github.com/simonw/c53f80a525d573533a730f5f28858...

It's pretty neat - it depends on testcontainers-core, sqlalchemy and psycopg2-binary and then defines a PostgresContainer class which fires up a "postgres:latest" container and provides a helper function for getting the right connection URL.



This is also its downfall as my organization uses asyncpg and compatibility with it is still absent iirc :(




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: