There are a few products that do this, there is one that I'm familiar with 
which is built off of SQLAlchemy called slashdb https://www.slashdb.com/ . it 
is commercial, but appears to offer a free development version.



On Fri, Mar 13, 2020, at 5:00 PM, Rob Kinyon wrote:
> For various reasons (not all of them sane), one of my clients wants to 
> implement a data access layer using a REST API that provides a single route 
> which takes a SQL statement as its only parameter and returns the result of 
> that statement as an array of hashes in JSON. (For now, please ignore the 
> problems of performance and all the other issues that arise around replacing 
> a stateful binary protocol with a stateless textual one.) For the purposes of 
> this question, let's assume that all queries are SELECT statements, each 
> query is its own transaction, and the entire result is returned in one 
> response (all responses are small-ish and cursors are implemented completely 
> on the client-side).
> 
> Ideally, my client would like to provide SQLAlchemy as an interface for its 
> developers and enable SQLAlchemy to use a module that would take the place of 
> pymysql or psycopg2. Vs, say, everyone reimplementing that work using 
> requests. So, my question:
> 
> Is there an existing Python database module that either does this or does 
> something very close to it that I can crib from?
> 
> -- 
> Thanks,
> Rob Kinyon
> _______________________________________________
> DB-SIG maillist - DB-SIG@python.org
> https://mail.python.org/mailman/listinfo/db-sig
> 
_______________________________________________
DB-SIG maillist  -  DB-SIG@python.org
https://mail.python.org/mailman/listinfo/db-sig

Reply via email to