home / github / commits

Menu
  • Search all tables
  • GraphQL API

commits: cf406c075433882b656e340870adf7757976fa4c

This data as json

sha message author_date committer_date raw_author raw_committer repo author committer
cf406c075433882b656e340870adf7757976fa4c New plugin hook: register_output_renderer hook (#441) Thanks @russss! * Add register_output_renderer hook This changeset refactors out the JSON renderer and then adds a hook and dispatcher system to allow custom output renderers to be registered. The CSV output renderer is untouched because supporting streaming renderers through this system would be significantly more complex, and probably not worthwhile. We can't simply allow hooks to be called at request time because we need a list of supported file extensions when the request is being routed in order to resolve ambiguous database/table names. So, renderers need to be registered at startup. I've tried to make this API independent of Sanic's request/response objects so that this can remain stable during the switch to ASGI. I'm using dictionaries to keep it simple and to make adding additional options in the future easy. Fixes #440 2019-05-01T23:01:56Z 2019-05-01T23:01:56Z cd9d55c7c0a7cc0ee69155676fd5e9fc6e1b884b 13ae486343ea6454a93114c6f558ffea2f2c6874 107914493 45057 9599
Powered by Datasette ยท Queries took 0.871ms