summaryrefslogtreecommitdiffhomepage
path: root/src/python/nxt_python_asgi_lifespan.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-06-01Python: Add ASGI lifespan state support.synodriver1-1/+53
Lifespan state is a special dict in asgi lifespan scope, which allow applications to persist data from the lifespan cycle to request/response handling. The scope["state"] namespace provides a place to store these sorts of things. The server will ensure that a shallow copy of the namespace is passed into each subsequent request/response call into the application. Some frameworks are already taking advantage of this feature, for example, starlette, and without this feature they wouldn't work properly. Signed-off-by: synodriver <diguohuangjiajinweijun@gmail.com> Reviewed-by: Andrew Clayton <a.clayton@nginx.com> [ Minor code tweaks to avoid lines > 80 chars, static a function and re-work the PyMemberDef structure initialisation for Python <3.7 and -Wwrite-strings compatibility - Andrew ] Tested-by: <https://github.com/synodriver> Tested-by: <https://github.com/hawiliali> Closes: <https://github.com/nginx/unit/issues/864> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2021-05-20Python: support for multiple targets.Oisin Canty1-16/+77
2020-11-10Python: supporting ASGI legacy protocol.Max Romanov1-3/+40
Introducing manual protocol selection for 'universal' apps and frameworks.
2020-11-05Python: request processing in multiple threads.Max Romanov1-49/+53
This closes #459 issue on GitHub.
2020-10-01Python: ASGI server introduced.Max Romanov1-0/+505
This closes #461 issue on GitHub.