kore/includes
Joris Vink ace8c4e80c Add asynchronous pgsql query support to python.
This commit adds the ability to use python "await" to suspend
execution of your page handler until the query sent to postgresql
has returned a result.

This is built upon the existing asynchrous query framework Kore had.

With this you can now write stuff like:

async def page(req):
	result = await req.pgsql("db", "SELECT name FROM table");
	req.response(200, json.dumps(result).encode("utf-8"))

The above code will fire off a query and suspend itself so Kore can
take care of business as usual until the query is successful at which
point Kore will jump back into the handler and resume.

This does not use threading, it's purely based on Python's excellent
coroutines and generators and Kore its built-in pgsql support.
2017-02-06 11:42:53 +01:00
..
http.h Add asynchronous pgsql query support to python. 2017-02-06 11:42:53 +01:00
jsonrpc.h JSONRPC Made request destruction explicit 2016-07-15 13:08:08 +02:00
kore.h mark kore_log with printf attribute. 2017-02-06 11:39:30 +01:00
pgsql.h pgsql improvements. 2017-02-06 11:40:33 +01:00
python_api.h undef _POSIX_C_SOURCE and _XOPEN_SOURCE before Python.h 2017-01-25 22:41:57 +01:00
python_methods.h Add asynchronous pgsql query support to python. 2017-02-06 11:42:53 +01:00
tasks.h Introduce NOHTTP=1 build option. 2015-11-27 16:22:50 +01:00