smorokin/fassung ? reverse-engineered prompt
Reverse engineered prompt
Build me a small Python library for working with PostgreSQL that feels like asyncpg, but uses the new template string literals instead of normal strings or positional parameters.
I want it to be safe against SQL injection, easy to read, and nice to use with type checking in the IDE. The main thing should be a Pool class that manages connections, lets me open transactions, and run queries like fetch, fetchval, and execute. Queries should accept template strings, and I should be able to compose smaller query pieces together without losing safety.
Also map query results into Python objects with pydantic, so I can fetch rows straight into models or dataclasses. Please include a few simple examples and tests that show basic querying, filtering, limits, offsets, and nested query composition. Use modern Python 3.14 features, and look up current docs online if you need to. Keep it clean and minimal, since this is more of a proof of concept than a production ready package.
Are you gonna build this?
make sure you review the code using coderabbit