emrebe06/sqlnocturne — reverse-engineered prompt

Reverse engineered prompt

Build me a small Python database toolkit called SQLNocturne. I want it to feel like a safer, lighter alternative to a full ORM, so it should not hide SQL completely, but it also should not let people run risky queries by accident.

Start with SQLite as the main working database, but set it up so PostgreSQL and MySQL connection URLs are recognized too, with clear adapter errors if the needed driver is not installed. I want a clean Database API with a query builder for select, insert, update, delete, plus safe raw SQL execution. Everything should return a consistent result object that can be turned into JSON, with fields like success, message, data, meta, and error.

Please include a strict safety mode that blocks update or delete without where, multiple statements, and obvious injection patterns. Add transactions, batch execution, a simple schema and migration workflow, repository style helpers, pagination, import and export to JSON, health checks, and a small CLI for common tasks. Keep it standard library friendly where possible, and look up current docs online if you need to.

Want more depth? Deep Reverse