Currently, REST API classes whose implements get, post, etc methods have to return dict or string.
Sometimes it is problematic to return relatively big response due to memory constrains.
Solution could be add support for generators as it is done for non REST methods.
Like:
class CustomersList():
async def get(self, data):
for c in self.customers:
yield '"customer": {}'.format(c)
Currently, REST API classes whose implements
get
,post
, etc methods have to returndict
orstring
.Sometimes it is problematic to return relatively big response due to memory constrains. Solution could be add support for generators as it is done for non REST methods.
Like: